EVALOPT parameter: Difference between revisions
RPuszewski (talk | contribs) No edit summary |
RPuszewski (talk | contribs) No edit summary |
||
Line 34: | Line 34: | ||
%s = %v | %s = %v | ||
%f = %v | %f = %v | ||
%n = | %n = "" | ||
printtext {~} = {%s} | printtext {~} = {%s} | ||
printtext {~} = {%f} | printtext {~} = {%f} |
Revision as of 22:50, 7 February 2023
Evaluation options
Summary
- Default value
- 0
- Maximum value
- 7
- Parameter type
- User
- Where set
- Any user
- Introduced
- V7.8 (Options 2 & 4 added in V7.9)
Description
The user parameter EVALOPT allows optional modifications to evaluation behaviors. The bits in EVALOPT have the following meanings:
X'01' | If on, the evaluating request will be cancelled on truncation of a data string. |
---|---|
X'02' | If on, the evaluating request will be cancelled on a non-convertable number. |
X'04' | If on, nulls will be considered as non-convertable numbers and the evaluating request cancelled . |
For example, consider the following code:
%v is string len 2 initial('ST') %s is string len 1 %f is float %n is float %s = %v %f = %v %n = "" printtext {~} = {%s} printtext {~} = {%f} printtext {~} = {%n}
If EVALOPT is set to 0 (default), then the above code would allow silent truncation and give the result:
%s = S %f = 0 %n = 0
If EVALOPT is set to 1 , then the above code is cancelled with the following message:
M204.0552: Variable too small for result
If EVALOPT is set to 2 or 4 , then the above code is cancelled with the following message:
M204.2985: Invalid numeric conversion