Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#define
Message
De
18/04/2018 11:53:51
 
 
À
18/04/2018 03:52:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Divers
Thread ID:
01659466
Message ID:
01659524
Vues:
53
>>>Another option worth trying, is simply to replace your quotes with [ ] around your expression- which should make the substitutions you want.
>>>
>>>
#DEFINE ACTIVEROWFORECOL		16711680		&&KOBALT blue
>>>#DEFINE ROWFORECOL			0 			&&black
>>>This.SetAll( 'DynamicForeColor', ;
>>>	[IIF( RECNO( This.RecordSource ) = This.nRecNo, ACTIVEROWFORECOL, ROWFORECOL )], 'COLUMN' )
>>
>>I stand corrected. #DEFINEd constants are not recognized as such when used in literal strings delimited with quotation marks - " or '.
>>
>>(QED, Thierry!)
>
>And the only reason they are recognized in brackets is because brackets can also be used as parentheses for array indexes, where constants need to be recognized... so it accidentally catches them within bracketed string literals, but not otherwise. That's a syntactical hiccup which can be a solution or cause of a problem, depending on what you do :).

brackets are the fox jolly.
? INT[1] , INT(1)
dimension x(1)
? X[1] , X(1)
? [A]
#DEFINE A 7
? [A]
Of course you can uses to implement metamorphic code
? [A]
#DEFINE A 7
? [A]
? x(1),x[1]
dimension x(1)
? x(1),x[1]
RELEASE x
? x(1),x[1]

PROCEDURE x(z)
	RETURN z+77
endproc
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform