IrisEvalW
Variants: IrisEvalA, IrisEvalH
int IrisEvalW(IRISWSTRP volatile expr)
Arguments
expr |
The address of a IRISWSTR 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 IrisEvalW 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 IrisEvalW, IrisExecuteW, or IrisEnd will overwrite the existing return value.
Return Values for IrisEvalW
IRIS_CONBROKEN |
Connection has been closed due to a serious error condition or RESJOB. |
IRISHW_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. |
IrisEvalW can also return any of the InterSystems IRIS error codes.
Example
int rc;
IRISWSTR retval;
IRISWSTR expr;
strcpy(expr.str, "\"Record\"_^Recnum_\" = \"_$$^GetRec(^Recnum)");
expr.len = strlen(expr.str);
rc = IrisEvalW(&expr);
if (rc == IRIS_SUCCESS)
rc = IrisConvert(ING,&retval);