-
-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
Description
The MExec function has a difference in behavior in X# and VO when a compiled expression that returns a CODEBLOCK is passed into it.
Code sample:
LOCAL cS AS STRING
LOCAL cbCompiledS AS CODEBLOCK // AS STRING in VO
LOCAL uResult AS USUAL
cS := "{|| STR(MY_DB_FIELD,1) }"
cbCompiledS := MCompile(cS)
uResult := MExec(cbCompiledS)
The workarea containing the MY_DB_FIELD field is not open yet. That is, the codeblock is pre-created before the opening of the workarea, in which it will be evaluated.
In VO, the MExec function does not generate an error, but "sees" that the code is a codeblock, creates it, and returns it to the calling program.
In X#, the MExec function throws an exception that the variable does not exist (as I understand it about MY_DB_FIELD).