Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/safeio.new
There is 1 other file named safeio.new in the archive. Click here to see a list.
NEW VERSION OF SAFEIO
---------------------

The SAFEIO System version 4.0 is an improved SAFEIO system
for conversational SIMULA programming.

It differs from version 3 in the following respects:

I.	The CLASS SAFE is now obsolete. Most of the functions
	earliar in SAFE now exists as separate procedures
	(most of them coded in MACRO-10) in LIBSIM.

	Thus:
	Uppercase is changed to LIBSIM: UPCASE.
	Leftstrip is changed to LIBSIM: FRONTSTRIP.

	As a consequence SAFEIO users will have to include
	the following external declarations (until we
	have found some way to make the system accept
	implicit declarations of LIBSIM modules):

	EXTERNAL BOOLEAN	PROCEDURE menu;
	! Perhaps also MENY (Swedish version);
	EXTERNAL CHARACTER	PROCEDURE fetchar,findtrigger;
	EXTERNAL INTEGER	PROCEDURE checkreal,checkint,scanint,ilog;
	EXTERNAL LONG REAL	PROCEDURE scanreal;
	EXTERNAL REF (Infile)	PROCEDURE findinfile;
	EXTERNAL REF (Outfile)	PROCEDURE findoutfile;
	EXTERNAL TEXT		PROCEDURE conc,upcase,frontstrip,
					rest,checkextension;
	EXTERNAL		CLASS safeio;   ! Or safei,simei or simeio;

	SIMEIO is identical to SAFEIO prefixed by Simulation.
	SIMEI  is identical to SAFEI  prefixed by Simulation.

II.	The HELP parameter is now BOOLEAN by NAME.
	This means that it is possible to use
	any boolean expression as actual parameter.
	For example - a boolean procedure (possibly
	with parameters) call having some nice side-
	effects. Thus there is a new SAFEIO boolean
	procedure HELP, with one text parameter - the
	help text to be displayed.


III.	The Checktable procedure is changed to LIBSIM: MENU.
	There is also a procedure LIBSIM: MENY
	handling }{`$#@. There are two new SAFEIO procedures
	related to the use of MENU.

	1. TEXT PROCEDURE COMMANDMESSAGE(index);   INTEGER index;
	   returning a text "?Unknown command." if index = 0
	   else "?Ambiguous command.".

	2. BOOLEAN PROCEDURE COMMANDHELP(table,n);
	   TEXT ARRAY table;   INTEGER n;
	   which displays available commands table[1:n] on
	   Sysout.

IV.	There are four new SAFEIO procedures for simple checking
	of numerical input.

	1. BOOLEAN PROCEDURE IRANGE(i,low,high);
	   INTEGER i,low,high;
	   returning TRUE if low <= i <= high.

	2. BOOLEAN PROCEDURE RANGE(x,low,high); ....
	   Ditto for REAL variables.

	3. TEXT PROCEDURE OUTOFIRANGE(low,high);
	   INTEGER low,high;
	   Returning an appropriate error message if i is
	   out of range (c.f. 1.).

	4. TEXT PROCEDURE OUTOFRANGE(low,high);
	   REAL low,high;
	   Ditto for REAL variables (c.f. 2.).

V.	The REQUEST procedure now starts with Setpos(0)
	(= Setpos(Length+1)) for the input file, thus
	avoiding loops at recursive call on REQUEST.

VI.	The language parameter to SAFEI(O) (the last parm i.e.)
	still works with "" (NOTEXT) giving SAFEIO.ENG.
	However there are two important changes.

	1. The user may specify a complete file spec.
	   for the language file. SAFEIO will then FIRST
	   try to find it on the specified area. If search
	   fails it will search on the SYS: area. If not found
	   there either - SYS:SAFEIO.ENG will be used.

	2. Default filename is "SAFEIO.".


VII.	In order to handle End-of-file on Sysin, a new VIRTUAL
	LABEL EOF is included in SAFEIO classes.
	If Sysin.Endfile becomes TRUE, a jump will go to
	this label in the users program. If no such label
	(match) is found, the SAFEIO block will terminate
	through an internal jump to the end of the SAFEIO block.
	NOTE! Once Sysin.Endfile is TRUE, there is no way to
	use Sysin any more during the execution!


VIII.	A label START is inserted just in front of the SAFEIO
	INNER. Thus if you code GO TO start,  the SAFEI(O)
	block will start from beginning (again).

IX.	The message files are changed and SAFEI (SIMEI) now
	uses the same files as SAFEIO (SIMEIO) - though
	only parts of them.


Declaration example :

BEGIN   EXTERNAL  declarations....;

    safeio("log","english") BEGIN
	... using safeio ...
    END safeio;
END of program

Good luck!

For more information - see SAFEIO.MAN.

			[End of SAFEIO.NEW]