Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I wish this was in VFP and not VB.....
Message
 
 
To
18/06/2001 20:28:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00519713
Message ID:
00520823
Views:
44
>>Thanks, George. I now have to check all my code and change #define CR and #define TAB to something else.
>>
>>BTW, what about:
>>
>>local lcCR, lcTab
>>lcCR=chr(13)
>>lcTab=chr(9)
>>
>>#define CR lcCr
>>#define TAB lcTab
>
>Don't. At least do not #define TAB, because TAB is a keyword (as in "Append from ... delimited with TAB"). Now that I told you it'll be easy, but it took me quite a time to understand why this command didn't want to compile... because the keyword was re#defined.
>
>Other than that, this method seems to be better and more efficient (specially in tight loops), but one thing to beware is if you do such a #define in a header file, and the constants start getting used all over the place - are you sure the variables will also be defined everywhere?
>
>The morale of the story would be that no matter what cool tools we get, we still have to do most of the thinking ourselves. These machines are simply not smart enough... that's why our job is to teach them :)

Thanks a lot, Dragan. Well, I definitely was not thinking, when I defined TAB and CRLF in lots of my programs, which use loops, etc. Now I have to go through all of them and change them back...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform