Hi sergey,
>
>Don't forget Macro substitution and EVAL() are cousins, they both require the runtime compiler to operate.>
>I've to disagree with you on that one. Macro substitution require the runtime compiler because it can include any valid VFP code. EVALUATE() on other hand, can include only expressions so it can be processed by EVALUATE() function itself w/o the runtime compiler.
Though I agree that marco's are far more flexible than EVAL() eval itself
does invoke the runtime compiler as the evaluated string can contain anything. For example:
cString = " ALLTRIM(STR(2)) = Test()"
? EVAL(cString)
? &cString
FUNCTION Test
RETURN "2"
As in this example is shown EVAL() and macros do not differ too much. The only diffence I can see is that the stringexpression has to return some value for the EVAL function. In both circumstances the string has to be compiled and executed. There is no way you can build a EVAL funtion without a runtime compiler.
Walter,