next up previous 211
Next: Using program parameters as tokens
Up: Using MSG within ADAM applications
Previous: Message parameters


Parameter references

It is often necessary to refer to an ADAM program parameter in a message. There are two kinds of reference required:

Parameter references can be included in the text of a message by prefixing their names with the appropriate escape character. To include the keyword associated with a parameter, its name is prefixed with the percent escape character, ``%'', e.g.

      CALL MSG_OUT( 'ET_RANGE','%ET parameter is ignored.', STATUS )

Here, the parameter `ET' might be associated in the interface file with the keyword ``EXPOSURE_TIME'', e.g.

parameter ET
   type '_INTEGER'
   keyword 'EXPOSURE_TIME'
   prompt 'Exposure time required'
endparameter

In this case, the resultant output would be

EXPOSURE_TIME parameter is ignored.

To include the name of an object, device or file associated with a parameter, the parameter name is prefixed with the dollar escape character, ``$'', e.g.

      CALL MSG_OUT( 'DS_CREATE', 'Creating $DATASET.', STATUS )

If the parameter `DATASET' is associated with the object called ``SWP1234'' then this would produce the output

Creating SWP1234.



next up previous 211
Next: Using program parameters as tokens
Up: Using MSG within ADAM applications
Previous: Message parameters

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