next up previous 63
Next: Direct Commands During Procedure Entry
Up: ICL Procedures
Previous: Listing Procedures


Editing Procedures

Entering procedures directly is fine for very simple procedures, but for anything more complex it is likely that some mistakes will be made in entering the procedures. When this happens it will be necessary to edit the procedure. Editing is accomplished from within ICL using standard editors. For example the command
    ICL> EDIT SQUARE_ROOT
would be used to edit the SQUARE_ROOT procedure. By default the TPU editor is used. It is also possible to select the EDT or LSE editors using the SET EDITOR command. All these editors are described in DEC's documentation.

When editing a procedure there are two possible options.

It is possible to enter procedures completely using the editors. However it is recommended that procedures be entered originally using direct entry. The advantage is that during direct entry, any errors will be detected immediately. Thus if we mistype the PRINT line in the above example we get the following error message:

    SQUARE_ROOT> PRINT The Square Root of (X is (SQRT(X))
    PRINT The Square Root of (X is (SQRT(X))
                                ^
    Right parenthesis expected
The error message consists of the line in which the error was detected. A pointer which indicates where in the line ICL had got to when it found something was wrong, and a message indicating what was wrong. In this case it found the 'is' string when a right parenthesis was expected.

Following such an error message we can use the command line editing facility to correct the line and reenter it. If the same error occurred during procedure entry using an editor, the error message would only be generated at the time of exit from the editing session, and it would be necessary to EDIT the procedure again to correct it.


next up previous 63
Next: Direct Commands During Procedure Entry
Up: ICL Procedures
Previous: Listing Procedures

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

9th June 1998
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council