next up previous
Next: Other Types of Parameters
Up: Extended Routines
Previous: Combined Constraints

Logical Value  

PAR_GTD0L obtains a scalar logical value, with a dynamic default defined, and has the capability of handling a null status. Thus the following obtains a value from the parameter SWITCH and stores it in the variable called POWER. The dynamic default is .TRUE..

           NULL = .FALSE.
           CALL PAR_GTD0L( 'SWITCH', .TRUE., NULL, POWER, STATUS )

The third argument is the same as we met in Section [*]. If we reverse the polarity of NULL, PAR_GTD0L will assign the dynamic default to POWER whenever the parameter is in the null state, and returns with STATUS set to SAI__OK. To reiterate NULL=.TRUE. should only be used when the dynamic default will always give reasonable behaviour in the application. This is highly likely for a logical value.



next up previous
Next: Other Types of Parameters
Up: Extended Routines
Previous: Combined Constraints

PAR Interface to the ADAM Parameter System
Starlink User Note 114
Malcolm J. Currie
Alan J. Chipperfield
1999 September 24
E-mail:ussc@star.rl.ac.uk