Message tokens can be used in the error text presented to ERR_REP in the same manner as their use in calls to MSG_OUT, MSG_OUTIF and MSG_LOAD. Here is an example where two values, LOWER and UPPER, are in conflict:
* Check if LOWER and UPPER are in conflict.
IF ( LOWER .GT. UPPER ) THEN
* Construct and report the error message.
STATUS = SAI__ERROR
CALL MSG_SETI( 'LO', LOWER )
CALL MSG_SETI( 'UP', UPPER )
CALL ERR_REP( 'BOUND_ERR',
: 'LOWER(^LO) is greater than UPPER(^UP).', STATUS )
GO TO 999
END IF
If the value of LOWER is 50 and the value of UPPER is 10, then the user might receive a message like:
!! LOWER(50) is greater than UPPER(10).
After a call to ERR_REP, all message tokens are left undefined.
MERS (MSG and ERR) Message and Error Reporting Systems