Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants and SYS(5) + SYS(2003)
Message
De
23/09/1999 14:12:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267724
Message ID:
00268107
Vues:
37
>
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform