IrisEvalA
Variants: IrisEvalW, IrisEvalH
int IrisEvalA(IRIS_ASTRP volatile expr)
Arguments
expr |
The address of a IRIS_ASTR variable. |
Description
Evaluates a string as if it were an InterSystems IRIS expression and places the return value in memory for further processing by IrisType and IrisConvert.
If IrisEvalA completes successfully, it sets a flag that allows calls to IrisType and IrisConvert to complete. These functions are used to process the item returned from IrisEvalA.
Caution:
The next call to IrisEvalA, IrisExecuteA, or IrisEnd will overwrite the existing return value.
Return Values for IrisEvalA
IRIS_CONBROKEN |
Connection has been closed due to a serious error condition or RESJOB. |
IRIS_ERSYSTEM |
Either InterSystems IRIS generated a <SYSTEM> error, or if called from a $ZF function, an internal counter may be out of sync. |
IRIS_NOCON |
No connection has been established. |
IRIS_STRTOOLONG |
String is too long. |
IRIS_SUCCESS |
String evaluated successfully. |
IrisEvalA can also return any of the InterSystems IRIS error codes.
Example
int rc;
IRIS_ASTR retval;
IRIS_ASTR expr;
strcpy(expr.str, "\"Record\"_^Recnum_\" = \"_$$^GetRec(^Recnum)");
expr.len = strlen(expr.str);
rc = IrisEvalA(&expr);
if (rc == IRIS_SUCCESS)
rc = IrisConvert(IRIS_ASTRING,&retval);