April 1, 1981 30U VM/370 eMS User's Guide
Section 16. Refining Your EXEC Procedures
This section provides supplementary information for writing complexEXEC procedures. Although the EXEC interpreter resembles, in some aspects, a
high-level programming language, you do not need to be a programmer to
writeEXECs. Some of the techniques suggested here, for example, on
annotating and writing error messages, are common programming practices,
which help make programs self-documenting and easier to read and to use.
Annotating EXEC Procedures
Lines in anEXEC file that begin with an asterisk (*) are commentary and
are treated as comments by theEXEC interpreter. You can use *
statements to annotate yourEXECs. If you write EXECs frequently, you
may find it convenient to include a standard comment at the beginning of
eachEXEC, indicating its function and the date it was written, for
example:
*EXEC TO HELP CONVERT LISTING FILES
*INTO SCRIPT FILES
* J. BEAN10/18/75 You can also use single asterisks or null lines to
between lines in anEXEC file to make examining the file
provide spacing
easier.
In anEXEC, you cannot place comments on the same line with an
executable statement. If you want to annotate a particular statement or
group of statements, you must place the comments either above or below
the lines you are annotating.
A good practice to use, when writingEXECs, is to set them up to
respond to a1 (question mark) entered as the sale argument. For
example, anEXEC named FSORT might contain: SCONTROL OFF SIF SINDEX = 1 SIF S1 = ? SGOTO -TELL
-TELLSBEGTYPE CORRECT FORM IS • FSORT USERID <VADDR> ' PRINTS AN ALPHABETIC LISTING OF ALL FILES ON THE SPECIFIED USER'S DISK. IF A VIRTUAL ADDRESS (VAtDR) IS NOT SPECIFIED, THE USER'S 191 IS THE DEFAULT. &END You may also wish
enter anEXEC name
arguments:
to anticipate the situation-in which a user might
with no arguments for anEXEC that requires
Section 16. RefiningYour EXEC Procedures 305
This section provides supplementary information for writing complex
high-level programming language, you do not need to be a programmer to
write
annotating and writing error messages, are common programming practices,
which help make programs self-documenting and easier to read and to use.
Annotating EXEC Procedures
Lines in an
are treated as comments by the
statements to annotate your
may find it convenient to include a standard comment at the beginning of
each
example:
*
*
* J. BEAN
between lines in an
provide spacing
easier.
In an
executable statement. If you want to annotate a particular statement or
group of statements, you must place the comments either above or below
the lines you are annotating.
A good practice to use, when writing
respond to a
example, an
-TELL
enter an
arguments:
to anticipate the situation
with no arguments for an
Section 16. Refining