next up previous
Next: History Text Width
Up: THE HISTORY COMPONENT
Previous: The History Update Mode

Using Message Tokens in History Text  

The NDF_HPUT routine facilitates the inclusion of variable values in history records by allowing message tokens to be optionally embedded within the lines of text supplied to it. If this facility is required, then the TRANS argument should be set to .TRUE. to request message token translation, and the tokens used should be defined beforehand - for instance, by calling the appropriate MSG_ routines (see SUN/104 which includes a full description of message tokens). In the following example, the results of an earlier calculation are inserted into a history record in this way:

      CALL MSG_SETI( 'NPIX', N )
      CALL MSG_SETR( 'VALUE', RESULT )
      CALL MSG_SETC( 'UNITS', CVAL )
      TEXT( 1 ) = 'Result of summing ^NPIX pixels:'
      TEXT( 2 ) = '                       ^VALUE (^UNITS)'
      TRANS = .TRUE.
      CALL NDF_HPUT( HMODE, APPN, REPL, 2, TEXT, TRANS, WRAP, RJUST, INDF,
                     STATUS )



next up previous
Next: History Text Width
Up: THE HISTORY COMPONENT
Previous: The History Update Mode


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

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