Result_Flag as L = EVAL_VALID( Expression as C [, Context as C ] )
Optional. The context in which the expression should be evaluated. This can be a list of tables in a CR-LF delimited list. It can also be the name of an open form (suffixed by ".this"), which would evaluate the expression in the context of the form.
EVAL_VALID() evaluates Expression and returns .T. (TRUE), if Expression is valid (can be interpreted as Xbasic code), or .F. (FALSE) if the Expression is invalid. This function is useful when the expression to be evaluated is itself constructed by another expression.
Alpha Five Version 5 and Above
Assume that varA = 1, and varB = 2. Assume that theExpression = "varA + varB" :
eval_valid("1 + 2") -> .T.
eval_valid("varA + varB") -> .T.
eval_valid(theExpression) -> .T.
eval_valid("date() ")-> .T.
eval_valid("daaate() ")-> .F.
For more examples on how the Context parameter is used, see EVAL().
Expression Evaluation Functions, EVAL()