Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0078/sys/simed.hlp
There is 1 other file named simed.hlp in the archive. Click here to see a list.
SIMED
--- SIMULA Editor and Indentation program Version 2(6) ---
The SIMED program edits SIMULA source program files into a readable
form.
SIMED can be used to indent a SIMULA program (for better readability)
according to the BEGIN-END structure. This is especially useful when
the program contains BEGIN-END nesting errors, which usually will
produce unhelpful compiler messages.
SIMED may also be used to convert reserved words, standard and user
identifiers to -
1) UPPER CASE 2) lower case 3) Edit Case (1st char. upper case).
Lines which become too long when indented will be split up at an
appropriate position.
If one of the following conditions holds, comments are not indented -
a) The start of the line is part of a comment or
b) The end of the line is part of an (unfinished) comment.
Command format for SIMED (example):
outfile=infile/i:4/r:80/e:13200
Default switches:
/I:4 Indent step 4. A non-positive argument implies that
leading tabs and blanks will be preserved and
indented according to Abs(arg).
/E:13200 Edit Reserved words, standard ids, own ids, Comments
/E:UEL00 and Options, Text and Character constants resp. 1 (U)
= Upper CASE, 2 (L) = Lower Case, 3 (E) = Edit case,
0 = no change. Thus /E:000 will
suppress all editing.
/R:80 Outfile record length 80.
/TABS Use tabs in indentation (default)
/C Check for non-unique identifiers with length >=12
(producing warnings).
Other switches:
/SIMSET Recognize SIMSET identifiers (default for SIMSET and
SIMULATION blocks)
/-SIMSET Do not recognize SIMSET ids
/SIMULATION Recognize SIMULATION identifiers (default for
SIMULATION blocks)
/-SIMULATION Do not recognize SIMULATION ids
/-TABS Do not use tabs
/NUMBERED:xx Produce line numbers, incr. xx (def. 100) (default if
input file has numbers).
/-NUMBERED Suppress line numbers on output.
(default if input file has no line numbers).
/-C Do not check long id:s (5-20% cheaper).
/Z:n Suppress indentation for n block levels. May be < 0,
>= -10, assuming surrounding levels.
Default /Z:0.
/G Perform last COMPIL command after processing, i.e.
last COMPILE, LOAD or EXECUTE command.
!xxx Run program xxx after processing. Thus ABC!SOS will
return to SOS editing last file edited. The command
NUL:!SOS is also legal.
Your own default switches can also be given in a file SWITCH.INI on
your area. You need only have one or more lines of the form:
SIMED /switch/switch...
Example: If you want files to be edited with reserved words in lower
case, your own identifiers in upper case, and standard identifiers
with upper case initial letter, standard indentation=2, record
length=100, put the following line in SWITCH.INI:
SIMED /E:LEU/I:2/R:100
Trailing zeros in the E switch may be omitted - the system default
will be used in those positions. You can always override the default
values in the command to SIMED.
Default extension is SIM. Default outfile name is infile name. (NUL:
and TTY: are accepted.)
If you want only default values, the command string to edit the file
X.SIM with the same output file name is simply X.
The shortest possible command to apply SIMED to a file X.SIM is -
.R SIMED-X (@SIMED -X in TOPS-20)
SIMED will take what follows after a minus sign as the first command
and exit after editing. CONTINUE will put SIMED in command mode,
expecting further commands. START or START-<command-string> may also
be used.
Just typing -
.R SIMED;
will start SIMED editing the last TECO/SOS edited file (by reading
TMP:EDS) using default switches (possibly redefined in SWITCH.INI).
Exit from SIMED by entering ^Z or ^C.
Restrictions:
Split up lines will not be indented properly if they contain BEGIN or
END.
Also, numerical constants containing blanks may occasionally be
improperly split. The programmer is recommended to start source code
lines with BEGIN and END resp.
Additional feature:
If a text constant includes <CR><LF> SIMED will ask the user for
permission to continue, in order to prevent a possible messing up of
the file. Otherwise if one of the quotes is missing all subsequent
(correct) text constants might be destroyed by Upper/lower case
editing. "Proper" text constants containing <CR><LF> will be changed
to new concatenated text contants now allowed in SIMULA.
Author:
Mats Ohlin, Swedish Research Institute of National Defence
FOA 1, Fack, S-104 50 STOCKHOLM 80, SWEDEN
[End of SIMED.HLP 78-02-15]