next up previous 282
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 282
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
T Jenness
23 July 2009
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council