Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constants and SYS(5) + SYS(2003)
Message
From
23/09/1999 14:12:00
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267724
Message ID:
00268107
Views:
38
>
>Also, I just looked through a bunch of .h files that come with VFP and there are plenty of places where chr() is used in the constants. See _help.h:
>
#DEFINE TAB			CHR(9)
>#DEFINE LF			CHR(10)
>#DEFINE CR			CHR(13)
>#DEFINE CR_LF		CR+LF
>#DEFINE	EVAL_ITEM	CHR(0)+"_"+CHR(255)
>What is the difference between CHR(13) and SYS(5)?
>
>Isn't this the same thing. I think if MS ever decides to change the behaviour to evaluate the constant as opposed to just replacing it won't that result in every constant being evaluated?
>All of sudden all those MB_ICONSTOP's become eval(16) instead of just 16.
>
>Besides I always think of constants as the opposite of variables. A variables value can change, a contants value never changes. In Mark's case the constant just happens to be an expression that gets evaluated at run-time.
>
>As I said I've just starting working with constants and am looking forward to your thoughts.

chr(13) will always return the same value but the sys functions may return different values. I'm inclined to agree with George on this one. I'd hate to rely on something that they've already warned us against and have ms pull the rug out from under us.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform