Re: Keypress Event problem
- From: "Paul E. Schoen" <pstech@xxxxxxxxx>
- Date: Tue, 24 Feb 2009 23:00:44 -0500
"Jamie" <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in message
Hans-Peter Diettrich wrote:
Jamie schrieb:No, I'm not confused. I just have a good understanding of compilers and
Writeable constants are a bad hack :-(
Writeable constants are not a hack, it in fact are a know
support function of many if not most compilers in one why or
It simply oads (predefined) values in the image that
can be accessed as normal data. You'll find that in many places
through out the libs.
You seem to confuse initialized variables with writeable constants.
the method I offered is the simplest to use with out using Event or
critical control objects for such a simple task.
If offers the coder to use the "Busy" name locally and maintain it's
define between calls on the stack in many code blocks with out conflict
and it makes it vary obvious to it's function when examining code.
If you are the kind that would rather have coders follow extreme
measures of coding that start to become unmanageable when a simple
solution is at hand, I feel sorry for you.
Just because it's not the way you do it or have been taught to do it
does not mean that no one else should do it.
I'll keep my practices to my self, I guess you don't like them and
most likely are going to make sure no one else does.
Have a good coding nightmare.
I found it very simple to use a global variable, although it might be
clearer to use what would be a static variable in the function. But that
does not seem to be an option in Delphi. It just seems like a constant
should be just that, meaning that it stays the same value and cannot be
changed. I am used to writing code for microprocessors and PICs, where a
constant would be in ROM, which physically cannot be changed (unless it is
flash memory or EEPROM). Variables should be just that, meaning they can be
changed and need to be changed at some point during execution.
The Delphi 4 help says that in older versions constants were writeable by
default, but recommends initialized variables for new projects. True
constants are defined as those that cannot change.
Thanks for the information, though. It's always good to learn something
- Prev by Date: Re: Keypress Event problem
- Next by Date: Re: Keypress Event problem
- Previous by thread: Re: Keypress Event problem
- Next by thread: Re: Keypress Event problem