next up previous 211
Next: Reserved token STATUS
Up: Using MSG within ADAM applications
Previous: Parameter references


Using program parameters as tokens

It is sometimes necessary to refer to a program parameter in a message, where its name is contained in a variable. In order to incorporate its reference into a message, a message token can be associated with its name. Here is an example of how this would be coded:

      CALL MSG_SETC( 'PAR', PNAME )
      CALL MSG_OUT( 'PAR_UNEXP','%^PAR=0.0 unexpected', STATUS )

In this example, the escape sequence ``$^\wedge$'' prefixes the token name, 'PAR'. The sequence '$^\wedge$PAR' gets replaced by the contents of the character string contained in the variable PNAME; this, being prefixed by ``%'', then gets replaced in the final message by the keyword associated with the parameter.



next up previous 211
Next: Reserved token STATUS
Up: Using MSG within ADAM applications
Previous: Parameter references

MERS (MSG and ERR) Message and Error Reporting Systems
Starlink User Note 104
P C T Rees
A J Chipperfield
22 October 2001
E-mail:ussc@star.rl.ac.uk

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