>>>>>>What is the simplest explanation as to why these are needed? Why not just set regular variable values? So what if they are constant and don't change?
>>>>>
>>>>>In addition to Hilmar's reply - all define variables would be substituted with their values in compilation time, e.g. the code would actually read 5 instead of SOMENUMBER every time where SOMENUMBER is used.
>>>>
>>>>But, from a practical standpoint, does that really matter? I haven't heard anything yet that is convincing that these are really needed or make much of a difference.
>>>
>>>Using variables = using memory
>>>Using DEFINES - no impact on memory
>>
>>Is this an issue really?
>
>It all depends on the number of the constans you'd like to use.
>
>I prefer "mixed" style, my former colleague Mike Asherman was a big favorite of DEFINEs and his code style influenced me quite a lot when I was just starting working with VFP.
>
>BTW, there are pre-processor directives in C# as well. If like #IF and #REGION so far, haven't figured out and used others yet.
__
There's also #define. But it seems to be more restricted than foxpro
#define SOMETHING
#if SOMETHING
...
#endif
What it does not have is
#define MYCONSTANT 77
For the others ...
http://msdn2.microsoft.com/en-us/library/ed8yd1ha(VS.71).aspx
Gregory