The first form of the parameter is used when we want to pass the value of an expression to the command, or we want to give the command a variable into which it will return a value. The other two forms both pass a string.
We can illustrate these various cases by using the PRINT command, which prints its parameters on the terminal.
ICL> X=1.234
ICL> PRINT (X)
1.23400
ICL> PRINT 'HELLO'
HELLO
ICL> PRINT HELLO
HELLO
In most cases therefore we do not need to use the quoted form of string parameters
because the simpler form will work. We need the quoted form of strings for those
cases in which we need to include a left parenthesis, or spaces in the string.
Here is an example with several parameters.
ICL> X=2
ICL> PRINT The Square Root of (X) is (SQRT(X))
The Square Root of 2 is 1.414214
What is happening here is that, since spaces are parameter separators,
'The', 'Square', 'Root' and 'of' are all
received by PRINT as independent parameters. However PRINT simply concatenates
all its parameters, with a space between each pair, and thus the result is the string
just as we typed it. Many other ICL commands which accept strings work in this
way. This means that strings with single spaces do not usually need quotes
when used as command parameters.
ICL The Interactive Command Language for ADAM