Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#define
Message
From
18/04/2018 11:53:51
 
 
To
18/04/2018 03:52:26
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01659466
Message ID:
01659524
Views:
54
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform