Trailing-Edge
-
PDP-10 Archives
-
decuslib10-04
-
43,50334/tops7s.gno
There are no other files named tops7s.gno in the archive.
%switch qz false
%if qz
%nocontrolc
%nextlesson pub("TOPQ");
%ifend qz
%text t1:
This lesson will teach you how to start and finish SOS editing.
%text t2:
Accessing SOS.
==============
One way to call SOS is by giving the monitor command "SOS".
SOS will then ask for the name of the file by printing
File:
You type the file name on the same line and push the RETURN key.
The file is now ready for editing.
EXAMPLE: SOS<return> SOS is called
File:PROG.SIM<return> The file PROG.SIM is ready
for editing.
%question q1:
Give the command to enter SOS and edit a file called "TEST.ALG".
%noextra
%order
%neutral SOS
%algol write("File:"); breakoutput; nopause:=true;
%neutral SO
%same
%wrong "SOS"
Do not type the quotation marks.
%right SOS test.alg
Another way is to type "SOS", press the RETURN key and type
the file name.
%goto t3;
%right SO test.alg
%same
%wrong prog.sim
That was the file I used in the example.
%extra
%wrong sostest
Didn't you forget a space?
%wrong sotest
%same
%wrong SOS File:test.alg
Type the "SOS" command and push the RETURN key.
%wrong SD
You probably typed "D" instead of "O" in "SOS".
%lack so
Just give the SOS command.
%wrong
%same
%wrong
%goto t2
%qend goto t3;
%qend begin procedure pause;;
%question begin integer errcount; goto bypassnormal; comment
%algol if false then bypassnormal:
begin
firsttry:=true; lasterrors:=lastrights:=errcount:=0;
pause; if back then begin back:=false; goto q1;end;
ihaveblanked:=false;
end;
getline;
%noextra
%order
%right TEST.ALG
%extra
%wrong "
Do not type the quotationmarks.
%goto q1
%wrong .SIM
The file had the extension ".ALG", not ".SIM".
%goto q1
%lack test.alg
Type the file name TEST.ALG on the same line as File:.
%goto q1
%wrong
End by typing the filename on the same line as File:
%goto q1
%wrong
%goto t2
%qend end;
%text t3:
If you use the SOS command to edit a file that does not
exist, a new file with the given name will be created
and edited.
%question q1a:
Do you give the same command in SOS for creating new
files as for editing old ones ?
%noextra
%order
%right yes
%wrong no
%extra
%neutral
Answer yes or no.
%goto q1a
%text t4:
Another way to edit a file in SOS is by typing the "SOS"
command and the file name on the same line separated with
a blank.
EXAMPLE: SOS TEST.ALG<return>
will enter SOS and edit the file TEST.ALG.
SOS will remember the last edited file so that the next
time yo want to edit the same file, you only have to type
"SOS".
%question q2:
What do you type if you want to enter SOS and edit a file
called "XYZ" by just using one line.
%order
%noextra
%right SOS XYZ
%wrong SOSXYZ
You must have a space between the SOS command and the file name.
%wrong SOXYZ
%same
%right SO XYZ
%wrong SOS
You were asked to give the complete command in one line.
%wrong SO
%same
%extra
%wrong SD
You typed "D" instead of "O" in "SOS".
%lack SOS
First you type the "SOS" command.
%lack XYZ
After SOS you type the file name.
%wrong
Type SOS followed by the file name.
%wrong
%goto t4
%text t5:
In SOS you can also access a file in a READ-ONLY mode.
That is, you can find information in your file but you
can not perform any editing.
The reason to do this is when file protection does not
allowyou to enter SOS editing mode, or when you just
don't want to have any editing done by accident.
You enter this mode by typing a slash followed by READONLY
after the file name.
EXAMPLE: SOS TEST.ALG/READONLY<return>
will access the file TEST.ALG in READ-ONLY mode.
%question qq1:
Give the command to access the file "VISTA.MAN" in
READ-ONLY mode. (Type the command in one line only.)
%order
%noextra
%right SOS VISTA.MAN / readonly
%wrong SOSVISTA.MAN / readonly
You must have a blank between SOS and the file name.
%right SOS VISTA.MAN / r
Instead of typing READONLY, you can use this abbreviation.
%right SOS VISTA.MAN / rea
%same
%right SOS VISTA.MAN / read
%same
%right SOS VISTA.MAN / ronly
%same
%wrong SOVISTA.MAN / readonly
You must have a blank between SO and the file name.
%right SO VISTA.MAN / readonly
%right SO VISTA.MAN / r
Instead of typing READONLY, you can use this abbreviation.
%right SO VISTA.MAN / rea
%same
%right SO VISTA.MAN / read
%same
%right SO VISTA.MAN / ronly
%same
%extra
%wrong SD
You typed "D" instead of "O" in "SOS".
%wrong test.alg
The filename was VISTA.MAN, not TEST.ALG.
%lack SO
First you type the "SOS" command.
%lack VISTA.MAN
You did not type VISTA.MAN
%lack /
Separate the file name and READONLY with a slash "/".
%lack READONLY
You did not type "READONLY"
%wrong
%wrong
%goto t5
%text t6:
Storing the file.
=================
When you have finished the editing of a file, you may want
to store the file on a disk.
To do that, you use the END command. It is written as the
letter "E" in command mode.
The file will then be stored under the same name as when it
was edited.
%text t7:
It is also possible to store the file without the line numbers.
You do that with the "ES" command. (End without Sequence numbers.)
This command is useful if you want to use the file as a DATA-file.
%question q7:
Type the two END commands you have learnt in this course
to store the file on disk.
%noextra
%noorder
%right e es
%right e , es
%right e and es
%right e or es
%wrong e
You only typed one of the commands.
%wrong es
%same
%extra
%wrong g
Yes, but answer with those commands you have
learnt so far in this course.
%goto q7
%wrong e
%same
%wrong "
Do not type the quotation marks.
%wrong
%goto t6
%question
Which command will store the file without line numbers ?
%noextra
%order
%right end without sequence number
%right et
%right en
%right es
%wrong e
This command stored the file WITH line numbers.
%right es command
%right the es command
%extra
%wrong "
Do not type the quotation marks.
%wrong
%wrong
Time for some repetition.
%goto t6
%text t8:
If you for some reason realize that the current edition
is worthless, you can use the END AND QUIT command.
It is written "EQ" and will return you to monitor
level without saving your edited file.
%question
What do you type if you want to end the editing mode
without saving your edited file?
%noextra
%order
%right EQ
%wrong E
This command will save your file.
%wrong ES
%same
%wrong w
This command will save your edited file and will NOT end the
editing mode.
%extra
%wrong *
The asterisk is printed by SOS and not by the user.
%wrong
%goto t8
%text
Example of the starting and finishing commands in SOS.
.SOS TEST.CBL SOS is called and the file TEST.CBL is edited.
INPUT: TEST.CBL Typed by SOS.
00100
.
. Insert your program.
.
05000 $ End the insert mode with ALTMODE or ESCAPE.
*E Store the edited file on disk.
[DSKB:TEST.CBL<057>] Typed by SOS.
. Monitor level.
(The asterisk and the point are printed by SOS.)
%text t9:
It is possible to rename the file, when you use the
"E" or "ES" command.
EXAMPLE: E:NEW<return>
will store the file under the new name "NEW".
%question
Suppose you are in SOS command mode and you want to
store your file and give it the new name "X.SIM".
What do you type ?
%noextra
%order
%right e : x.sim
%right es : x.sim
%right w : x.sim
How did you know that command ??
We have not talked about it yet.
%extra
%wrong *
The asterisk is printed by SOS and not by the user.
%lack e
Use the "E" or "ES" command.
%lack es
%same
%lack :
Type a colon ":" between the END command and the new file name.
%lack x.sim
Type the new file name after the colon.
%lack e
Use the "E" or the "ES" command.
%lack es
%same
%wrong
%wrong
%goto t9
%text t10:
There is another command in SOS called SAVE WORLD.
It is written "W" and works like the end "E" command,
except that it will still keep you in the edit mode.
This command should be given from time to time.
It is used to save the current version of the file,
in case the system should crash.
If the system does crash, you will lose only the
updates made since the last "W" command was given.
%question
Give the SAVE WORLD command in SOS.
%noextra
%order
%right w
%wrong save world
The command is written "W"
%extra
%wrong "
Do not type the quotation marks!
%wrong
%goto t10
%text t11:
The Go command.
===============
This command can only be used after you have given an
execution command (such as EXECUTE, LOAD or COMPILE)
previously in the same session.
It works like the "E" command, but it also runs
the previous execution command.
The GO command is written "G".
%question q10:
Will the GO command save your edited file on a disk ?
%right yes
%wrong no
Like the "E" command, it will store your file on a disk.
%goto t11
%neutral
Answer yes or no.
%goto q10
%question q11:
Is it always possible to use the GO command to execute your program ?
%right no
%wrong yes
The GO command can only be used when you have given an execution
command previously in the same session.
%extra
%neutral
Answer yes or no.
%goto q11
%question
Give the GO command in SOS.
%noextra
%order
%right g
%wrong go
The GO command is written "G".
%extra
%wrong "
Do not type the quotation marks.
%wrong
The GO command is written "G".
%wrong
Type "G".
%text t12:
It is also possible to use the GO command with the extension
S or Q.
The command "GS" saves your file on a disk and runs the
previous execution command.
The command "GQ" will not save your edited file, but will
run your last execution command again.
%question q80:
Do you want to repeat this lesson ?
%neutral yes
%goto start
%neutral no
%goto endoflesson
%neutral
Answer yes or no!
%goto q80
%text summary:
Summary
=======
SOS Command Effect
----------- ------
E Save the file with line numbers and exit from SOS.
ES Save the file without line numbers and exit.
EQ Skip the edited version and exit from SOS.
G Same as "E", but execute last "EX" command after exit.
GS Same as "ES", but execute last "EX" command after exit.
GQ Same as "EQ", but execute last "EX" command after exit.
W Save the edited file, but don't exit.
%algol pause;
%end