>>>Another option worth trying, is simply to replace your quotes with [ ] around your expression- which should make the substitutions you want.
>>>
>>>
#DEFINE ACTIVEROWFORECOL 16711680
>>>#DEFINE ROWFORECOL 0
>>>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