next up previous 94
Next: ADAM program parameters
Up: Value formats
Previous: Value formats

ICL command parameters

Parameter value specifications in an ICL command can take three forms:

The first form is used to pass the value of an ICL expression to a command, or to give a command a variable in which to return a value. The other two forms both pass a string.

We can illustrate the three forms by using the PRINT command which prints its parameter values on the terminal:

    ICL> X=1.234
    ICL> PRINT (X)
    1.234000
    ICL> PRINT 'HELLO'
    HELLO
    ICL> PRINT HELLO
    HELLO

In many cases you do not need to use the quoted form of a string because the simpler form will work. You need the quoted form for those cases in which you need to delimit a single string containing a left parenthesis or spaces. Consider the following example which contains a PRINT command which has several parameters:

    ICL> X=2
    ICL> PRINT The Square Root of (X) is (SQRT(X))
    The Square Root of          2 is 1.414214

Since spaces are parameter separators, `The', `Square', `Root', and `of' are all received by PRINT as separate parameters. However, PRINT simply concatenates all its parameters with a space between each pair. Thus, the output written by PRINT is the string, just as you typed it. Many other ICL commands which accept strings work in this way. This means that strings with single spaces may not need quotes when used as command parameters. However, in general this is not true of commands which run ADAM programs when strings are specified on the command line (see below).

The rules for specifying ICL command parameters can be summarized as follows:



next up previous 94
Next: ADAM program parameters
Up: Value formats
Previous: Value formats

ADAM The Starlink Software Environment
Starlink Guide 4
M D Lawden, K F Hartley
12 August 1992
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council