next up previous 63
Next: Listing Procedures
Up: ICL Procedures
Previous: Direct Entry of Procedures


Running a Procedure

To run the procedure we have entered we use the command format described earlier, using the procedure name as the command, and adding any parameters required.
    ICL> SQUARE_ROOT (2)
    The Square Root of         2 is 1.414214
But we can also specify the parameter without parentheses:
    ICL> SQUARE_ROOT 2
    The Square Root of 2 is  1.414214
What has happened here is that instead of the numeric value 2, we have passed the string '2' as the parameter. However, the SQRT function requires a numeric argument, so converts this string to a number. Thus, the free approach to type conversion, means that in many cases the rules for command parameters described in the previous chapter can be relaxed.
    ICL> Y=3
    ICL> SQUARE_ROOT Y
    The Square Root of Y is  1.732051
In this case the parameter passed was the string 'Y', but once again this was converted to a numeric value for the SQRT function.

next up previous 63
Next: Listing Procedures
Up: ICL Procedures
Previous: Direct Entry of Procedures

ICL The Interactive Command Language for ADAM
Starlink Guide 5
J A Bailey
A J Chipperfield

9th June 1998
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council