next up previous 204
Next: Reporting Status, Fortran I/O and Operating System Errors
Up: EMS Error Message Service
Previous: Reporting Errors


Message Tokens

The facility to use message tokens to embed the values of program variables within the message text is available in EMS. As in MSG and ERR, these message tokens are indicated by prefixing the token name with an up-arrow, ``$^\wedge$'', escape character within message text, e.g.
CALL EMS_REP( 'EMS_ROUTN_TOKEN', 'Error text: ^TOKEN', STATUS )
Message tokens can be set to the most concise character encoding of a given variable's value with the routines EMS_SETx, e.g.
CALL EMS_SETC( 'TOKEN', 'A token' )
For the EMS_SETx routines, x corresponds to one of five standard Fortran 77 data types:
x Fortran Type
D DOUBLE PRECISION
R REAL
I INTEGER
L LOGICAL
C CHARACTER
These routines are analogous to the subroutines MSG_SETx provided by the Message Reporting System (see SUN/104). As for the MSG routines, if the token has already been set, the new string will be appended to the existing one. All defined message tokens are annulled by a call to EMS_ANNUL, EMS_ELOAD, EMS_EXPND, EMS_REP or EMS_MLOAD1. They may be renewed to their previous defined values by a call to EMS_RENEW provided that no new tokens have been defined in the meantime.



next up previous 204
Next: Reporting Status, Fortran I/O and Operating System Errors
Up: EMS Error Message Service
Previous: Reporting Errors

EMS Error Message Service
Starlink System Note 4
P C T Rees
A J Chipperfield
28 September 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils