sysVar.validationMsgNum
The system variable sysVar.validationMsgNum is available in a text application and contains the value assigned by sysLib.validationFailed. The value is reset to zero in each of the following cases:
- The program initializes
- The program issues a converse, display, or print statement
- The program reissues a converse statement to display a text form as the result of a validation error
You can test the value of sysVar.validationMsgNum to determine if a validation function reported an error.
You can use sysVar.validationMsgNum in these ways:
- As the source or target of an assignment or move statement (also allowed in the "for count" of a move statement)
- As the variable in a logical expression
- As the argument in a return or exit statement
The characteristics of sysVar.validationMsgNum are as follows:
- Primitive type
- INT
- Is value always restored after a converse?
- No
Example
/*Keep the first message number that was set during validation routines */ if (sysVar.validationMsgNum > 0) sysLib.validationFailed(10); end
Related reference
converse
display
sysLib.validationFailed
System words in alphabetical order