ALGOL60 System Library

If you require information about a particular procedure, type its name then press <RETURN>. Otherwise press <RETURN>.

ABS

DEFINITION: This real procedure gives the absolute value, or modulus, of the real quantity specified on entry. CALL: ABS (E) E is a real parameter called by value. ERROR CONDITIONS: None.

ARCTAN

DEFINITION: This real procedure gives the principal value of the angle whose tangent is specified on entry. CALL: ARCTAN (E) E is a real parameter called by value. The value in radians of the angle whose tangent is specified by E is returned. ERROR CONDITIONS: None.

CLOSEDA

DEFINITION: This procedure closes the direct access file on the channel specified on entry. CALL: CLOSEDA(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. As all DAFILES are closed automatically at the end of a program this procedure is rarely required; but if the file is closed during the run it may not be used again without reopening. ERROR CONDITIONS: If a file is closed twice, or an attempt is made to close a file which has been neither opened nor defined, the program terminates with an appropriate message.

CLOSESQ

DEFINITION: This procedure closes the sequential file on the channel specified on entry. CALL: CLOSESQ(CH) CH is an integer parameter called by value which specifies the channel number, and whose value must be in the range allowed by the operating system being used. As all sequential files are closed automatically at the end of a program this procedure is rarely required; but if the file is closed during the run, it may not be used again without reopening. ERROR CONDITIONS: If a file is closed twice, an attempt is made to close a file which has not been opened, or an attempt is made to close a file which has been neither opened nor defined, the program terminates with an appropriate message.

CLOSESTREAM

DEFINITION: This procedure closes the user-defined stream on the channel specified on entry. CALL: CLOSE STREAM (CH) CH is an integer parameter called by value giving the number of the stream to be closed. The stream CH is closed such that on the next call of either SELECT INPUT or SELECT OUTPUT for that stream, the stream is reset to the start. Note that CH must not be the current input or output stream. ERROR CONDITIONS: If the stream is not defined on entry to the procedure, if an attempt is made to close a stream not in the range allowed by the operating system being used, or if CH is a current stream, then the program terminates with the following message: STREAM NOT DEFINED

CODE

DEFINITION: This integer procedure provides the code value of the character X which must be a single character and must be enclosed in string quotes. CALL: CODE (X) X is a single character string parameter. This procedure enables the programmer to manipulate the character information without needing to know the internal codes employed for characters, and greatly facilitates the transfer of ALGOL programs between computers using different internal codes. As in PRINTSTRING, _ and \ will give the internal code for space and newline respectively. The two character string EL will also give the newline code. ERROR CONDITIONS: None.

COPYTEXT

DEFINITION: This procedure transfers symbols from the input stream to the output stream up to but not including the string parameter specified on entry. CALL: COPYTEXT (ST) ST is a string parameter. Symbols are transferred from the input stream to the output stream until the string ST is encountered. The string itself is not output. ERROR CONDITIONS: None. NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

COS

DEFINITION: This real procedure gives the principal value of the cosine of the quantity specified on entry. This quantity must be in radians. CALL: COS(E) E is a real parameter called by value. ERROR CONDITIONS: If the modulus of the argument of this function is greater than 3.53 x 10 , the result would be wholly inaccurate, and the program terminates with the following message: COS ARG OUT OF RANGE

CPUTIME

DEFINITION: This real procedure gives the total CPU time used from an arbitrary starting point. CALL: CPUTIME No parameters. The total CPU time used since an arbitrary starting point is returned as a positive real number having seconds as its unit of time. Note that there is a CPU time overhead in calling the function itself. ERROR CONDITIONS: None.

ENTIER

DEFINITION: This integer procedure gives the largest integer not greater than the value of the quantity specified on entry. CALL: ENTIER(E) E is a real parameter called by value. The value of the largest integer not greater than the value of E is returned. e.g. ENTIER(2.7)= 2 ENTIER(-3.1)=-4 ERROR CONDITIONS: Integer overflow will occur if E is outside the range of valid integers.

EPSILON

DEFINITION: This real procedure gives the smallest positive real number such that the computational result of (1.0 + EPSILON) is greater than 1.0, and the computational result of (1.0 - EPSILON) is less than 1.0. CALL: EPSILON No parameters. The value of the smallest positive real number to satisfy the following conditions is returned: 1.0 + EPSILON > 1.0 1.0 - EPSILON < 1.0 ERROR CONDITIONS: None.

EXP

DEFINITION: This real procedure gives the value of 'e' raised to the power of the quantity specified on entry. CALL: EXP(X) X is a real parameter called by value. The value of 'e' raised to the power X is returned. If the argument of this function is less than -180.218 then zero is returned. ERROR CONDITIONS: If the argument of this function is greater than 174.673, the program terminates with the following message: EXP ARG OUT OF RANGE

FAULT

DEFINITION: This procedure outputs the string ST, prints the parameter R on the current output stream and then terminates program execution. CALL: FAULT(ST,R) ST is a string parameter. R is a real parameter called by value. ERROR CONDITIONS: None.

GETDA

DEFINITION: This procedure reads data from the specified channel into the specified area from the specified block on the file. CALL: GETDA (CH,SECT,A) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. SECT is an integer parameter whose value on entry specifies the number of the first record to be read and, on exit, contains the number of the last record read by this call. A is the name of the array to be read and can be of any type. e.g. real integer ____/_______/%"OOLEAN %ARRAYNAME A Information is read from file CH starting at record SECT and is written into ARRAY A. ERROR CONDITIONS: If an attempt is made to access a record on the file which does not exist, the program terminates with the message: RECORD NUMBER OUT OF RANGE If the specified channel is not open, the program terminates with: FILE NOT OPEN If an invalid record size has been specified in a file definition, the program terminates with the message: INVALID RECORD SIZE If an input or output request is not consistent with the file definition, the program terminates with the message: INVALID OPERATION ON FILE If an attempt is made to read from a file with an invalid channel number or one which has not been defined, the program terminates with an appropriate error message. On creation the complete file is filled with the unassigned pattern.

GETSQ

DEFINITION: This procedure reads one record from the channel specified on entry into the array specified on entry. CALL: GETSQ(CH,A) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. A is the name of the array into which the record is read and can be of any type: real integer ____/_______/%"OOLEAN %ARRAYNAME A ERROR CONDITIONS: If the record read is larger than the array then the record will be truncated. If the record is smaller, then the content of the remainder of the array is undefined. If an attempt is made to read a record before opening channel CH then the program terminates with the message: FILE NOT OPEN If an attempt is made to read beyond the end of the file then the program terminates with the message: INPUT ENDED If an attempt is made to read from a file with an invalid channel number or one which has not been defined the program terminates with an appropriate error message.

IABS

DEFINITION: This integer procedure gives the value of the modulus of the integer quantity specified on entry. CALL: IABS(E) E is an integer parameter called by value. ERROR CONDITIONS: Integer overflow occurs if an attempt is made to take the modulus of the largest negative integer.

INCHAR

DEFINITION: This procedure uses the SELECT INPUT procedure to select the input stream CH, unless it is already selected, and then sets INT to the value corresponding to the first position in string ST of the current input character. CALL: INCHAR(CH,ST,INT) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ST is a STRING parameter. INT is an integer variable which is assigned the value corresponding to the first position in ST of the current input character. INT is set to 1 if the first character of the string corresponds to the current character on the input stream. ERROR CONDITIONS: If the current character is not given in the string, ST, then INT is set to zero. The stream pointer is updated to point to the next character. If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character.

ININTEGER

DEFINITION: This procedure uses the SELECT INPUT procedure to select the input stream CH, if not already selected, and then uses procedure READ, to input the next number and assign it to I. CALL: ININTEGER (CH,I) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. I is an integer variable and is assigned from the next number read on the currently selected input stream. The next number in the input stream is read and assigned to integer I. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. If a non-numeric symbol is found when not expected then the program terminates with the message: SYMBOL IN DATA followed by the invalid symbol.

INREAL

DEFINITION: This procedure uses the SELECT INPUT procedure to select the input stream CH, if not already selected, and then uses procedure READ to input the next number and assign it to X. CALL: INREAL(CH,X) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. X is a real variable and is assigned from the next number read on the currently selected input stream. The next number in the input stream is read and assigned to real X. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. If a non-numeric symbol is found when not expected then the program terminates with the message: SYMBOL IN DATA followed by the invalid symbol.

LENGTH

DEFINITION: This integer procedure returns the number of characters in the open string, ST, excluding the enclosing string quotes. CALL: LENGTH (ST) ST is a string parameter. ERROR CONDITIONS: None

LN

DEFINITION: This real procedure returns the value of the logarithm to the base 'e' of the quantity specified on entry. CALL: LN(E) E is a real parameter called by value. ERROR CONDITIONS: If E is negative the program terminates with the following message: LOG ARG NEGATIVE If E is zero the program terminates with the message: LOG ARG ZERO

MAXINT

DEFINITION: This integer procedure gives the maximum allowable positive integer. CALL: MAXINT No parameters. ERROR CONDITIONS: None.

MAXREAL

DEFINITION: This real procedure gives the maximum allowable positive real number. CALL: MAXREAL No parameters. ERROR CONDITIONS: None.

MINREAL

DEFINITION: This real procedure gives the minimum allowable positive real number that is distinguishable from zero. CALL: MINREAL No parameters. ERROR CONDITIONS: None.

MONITOR

DEFINITION: This procedure can be called to invoke the diagnostic package without terminating execution of the program. CALL: MONITOR No parameters. ERROR CONDITIONS: None.

NEWLINE

DEFINITION: This procedure outputs one 'newline' character to the currently selected output stream. CALL: NEWLINE No parameters. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

NEWLINES

DEFINITION: This procedure outputs N newline characters to the currently selected output stream. If N <= 0 then the procedure has no effect. CALL: NEWLINES(N) N is an integer parameter called by value. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

NEWPAGE

DEFINITION: This procedure outputs to the currently selected output stream a command to throw to the head of a new page. CALL: NEWPAGE No parameters. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

NEXTCH

DEFINITION: This integer procedure reads one character from the currently selected input stream, but leaves the input stream positioned at that character so that the character may be read again with a call of READCH or a further call of NEXTCH. CALL: NEXTCH No parameters. Any number of consecutive calls of NEXTCH on the same channel will all obtain the same character. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. NOTE: This is a 1900 ALGOL compatible procedure provided for the convenience of programmers with working 1900 programs.

NEXTSYMBOL

DEFINITION: This integer procedure reads one character from the currently selected input stream but leaves the input stream positioned at that character. CALL: NEXTSYMBOL No parameters. Any number of consecutive calls of NEXTSYMBOL on the same channel will all obtain the same character. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character.

OPENDA

DEFINITION: This procedure opens the direct access file on channel number CH, where CH must be in the range allowed by the operating system being used. CALL: OPENDA(CH) CH is an integer parameter called by value, which specifies the channel number to be opened and whose value must be in the range allowed by the operating system being used. The file is opened for reading or writing. ERROR CONDITIONS: If a file is opened twice without being closed, the program terminates with the following message: FILE ALREADY OPEN If an attempt is made to open a file with an invalid channel number or a channel which has not been defined, the program terminates with an appropriate error message. Although the channel number must lie in the range appropriate to the operating system being used it must not conflict with any channel numbers previously assigned to either stream I/O or to sequential files. The user must declare his direct access file requirements to the operating system as specified in the appropriate User's Guide.

OPENSQ

DEFINITION: This procedure opens a binary sequential I/O channel. It must be called before GETSQ or PUTSQ is called for that channel. CALL: OPENSQ(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. The file is made ready for reading or writing, but note that both options may not be exercised. If a file is closed in a program and then reopened, it will be reset to the start. ERROR CONDITIONS: If a file is opened twice without being closed, the program is terminated with the message: FILE ALREADY OPEN If an attempt is made to open a file with an invalid channel number or a channel which has not been defined, the program terminates with an appropriate error message. Although the logical channel number must lie in the range appropriate to the system being used it must not conflict with any channel numbers assigned to either stream I/O or direct access files. The user must declare his sequential file requirements to the operating system as specified in the appropriate User's Guide.

OUTCHAR

DEFINITION: This procedure uses SELECT OUTPUT to select the output stream, CH, if not already selected, and then outputs the character in the string, ST, to which the value of INT points. CALL: OUTCHAR(CH,ST,INT) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ST is a string parameter, one character of which is to be output. INT is an integer parameter called by value which points to a character within the string ST. If INT has a value 1, the first character of the string, ST, is output. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

OUTINTEGER

DEFINITION: This procedure uses the SELECT OUTPUT procedure to select the output stream, CH, if not already selected, and outputs I in the form PRINT(I,10,0) followed by a semi-colon and a newline. CALL: OUTINTEGER(CH,I) CH is an integer parameter called by value which specifies the channel number, and whose value must be in the range allowed by the operating system being used. I is an integer parameter called by value which is to be output to the currently selected output stream. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

OUTPUT

DEFINITION: This procedure outputs the value of QU in floating point form D&E where the mantissa D is written with 10 significant figures and the exponent E consists of two digits preceded by a negative sign or a space representing + and followed by a semi-colon and a newline. CALL: OUTPUT(QU) QU is a real parameter called by value which is to be output in floating point form. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

OUTREAL

DEFINITION: This procedure uses the SELECT OUTPUT procedure to select the output stream, CH, if not already selected, and outputs X in the form PRINT(X,0,10) followed by a semi-colon and a newline. CALL: OUTREAL(CH,X) CH is an integer parameter called by value which specifies the channel number, and whose value must be in the range allowed by the operating system being used. X is a real parameter called by value which is to be output to the currently selected output stream. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

OUTSTRING

DEFINITION: This procedure uses SELECT OUTPUT to select the output stream, CH, if not already selected, and then outputs the string, ST, followed by a semi-colon and a newline. CALL: OUTSTRING(CH,ST) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ST is a string parameter to be output. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

OUTTERMINATOR

DEFINITION: This procedure uses SELECT OUTPUT to select the output stream, CH, if not already selected, and then outputs a semi-colon followed by a newline. CALL: OUTTERMINATOR(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

PAPERTHROW

DEFINITION: This procedure outputs to the currently selected output stream a command to throw to the head of a new page. CALL: PAPERTHROW No parameters. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

PRINT

DEFINITION: This procedure outputs to the currently selected output stream the value of Q, preceded by a sign, in the format determined by the parameters M and N. CALL: PRINT(Q,M,N) Q is a real or integer parameter called by value which specifies the number to be output. M and N are integer parameters called by value which determine the format of the number as follows: M=0,N#0 The number is output in the floating point form D&E, where the mantissa D is written to N+1 significant digits such that 1 <= D < 10, and the exponent E consists of two digits with a negative sign or a space representing +. The number always occupies N+7 character positions in all. e.g. M=0 and N=5: -1.23456& 10 3.45678&-12 1.00000& 2 M#0,N#0 The number is output in fixed-point form with M digits to the left of the decimal point and N digits to the right. The number occupies M+N+2 character positions in all. e.g. M=3 and N=2: 123.45 22.25 -1.00 M#0,N=0 The number is output in integer form occupying M+1 character positions in all. e.g. M=4 and N=0: 55555 -1234 10 In each format, the total count of character positions includes a sign character which is a minus or a space. If M#0 and the number has more than M digits in the integral part, further character positions will be used to accommodate the number. This may cause following numbers to be displaced to the right when the results are printed. If M#0 and the number has less than M digits in the integral part, spaces are inserted before the sign character to fill up to the required number of character positions. For numbers whose modulus is less than 1, the zero before the decimal point is printed; that is, it is not replaced by a space, for example, 0.001. The fractional part of a number is rounded, in the decimal form, to the appropriate number of decimal places. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

PRINTCH

DEFINITION: This procedure outputs one character (defined by the n least significant bits of CH) to the currently selected output stream: n is seven under VME/B and eight on EMAS. CALL: PRINTCH(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

PRINTSTRING

DEFINITION: This procedure outputs the given string to the currently selected output stream. CALL: PRINTSTRING(ST) ST is a string parameter. Since spaces and newlines are ignored in ALGOL, it is necessary to use special characters within the string to represent space and newline. The space is represented by _ and newline by \. The string is stored with _ and \ represented by their ISO internal code and the substitution is done by the PRINTSTRING procedure when the string is output. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

PRINTSYMBOL

DEFINITION: This procedure outputs one character defined by the n least significant bits of I to the currently selected output stream: n is seven under VME/B and eight on EMAS. CALL: PRINTSYMBOL(I) I is an integer variable called by value which specifies the character to be output. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

PRINT1900

DEFINITION: This procedure outputs to the currently selected output stream the value of QU followed by two spaces. CALL: PRINT1900(QU,M,N) QU is a real or integer parameter called by value which specifies the number to be output. M and N are integer parameters called by value which determine the format of the number as follows: M=0,N#0 The number is output in the floating point form D&E, where the mantissa D is written to N+1 significant digits such that 1 <= D < 10, and the exponent E consists of two digits with a negative sign or a space representing +. The number always occupies N+9 character positions in all. e.g. M=0 and N=5: -1.23456& 10 3.45678&-12 1.00000& 2 M#0,N#0 The number is output in fixed-point form with M digits to the left of the decimal point and N digits to the right. The number occupies M+N+4 character positions in all. e.g. M=3 and N=2: 123.45 22.25 -1.00 M#0,N=0 The number is output in integer form occupying M+3 character positions in all. e.g. M=4 and N=0: 55555 -1234 10 In each format, the total count of character positions includes a sign character which is a minus or a space, and two spaces after the last digit. If M#0 and the number has more than M digits in the integral part, further character positions will be used to accommodate the number. This may cause following numbers to be displaced to the right when the results are printed. If M#0 and the number has less than M digits in the integral part, spaces are inserted before the sign character to fill up to the required number of character positions. For numbers whose modulus is less than 1, the zero before the decimal point is printed; that is, it is not replaced by a space, for example, 0.001 . The fractional part of a number is rounded, in the decimal form, to the appropriate number of decimal places. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

PUTDA

DEFINITION: This procedure is used to write data from one array in store to a file. CALL: PUTDA(CH,SECT,A) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. SECT is the name of an integer variable which on entry should contain the number of the first record to be written. On exit it will contain the number of the record after the last record written by this call. A is the name of the array to be written and can be of type real ____, integer boolean _______ or _______. A call of PUTDA will result in one or more records being written depending on the number of bytes in the array defined. If the array written is not an exact multiple of the defined record size then the contents of the end of the last record written will be undefined. ERROR CONDITIONS: If an attempt is made to access a non-existent record on the specified file, the program terminates with the message: RECORD NUMBER OUT OF RANGE If the specified channel is not open, the program terminates with: FILE NOT OPEN If an attempt is made to write to a file with an invalid channel number or one which has not been defined, the program terminates with an appropriate error message. If an invalid record size has been specified in a file definition, the program terminates with the message: INVALID RECORD SIZE If an input or output request is not consistent with the file definition, the program terminates with the message: INVALID OPERATION ON FILE

PUTSQ

DEFINITION: This procedure outputs one logical record, for each call on PUTSQ, the length of which is determined by the length of the array to be output. CALL: PUTSQ(CH,A) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. A is the name of the array in which the data will be found and can be of type real integer boolean ____, _______ or _______. ERROR CONDITIONS: If a minimum and/or maximum record size for the sequential file has been defined and the length of the array to be written is incompatible with this record size then the call on PUTSQ will be faulted. If the specified channel is not open then the program terminates with the following message: FILE NOT OPEN

READ

DEFINITION: This real procedure reads numerical data from the currently selected input stream, ignoring multiple space, newline or newpage characters before the start of the number, and terminates on reading the first character which is neither a digit nor a correctly placed exponent or sign. The symbols & and are used as representation of CALL: READ No parameters. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. If a non-numeric symbol is found when not expected then the program terminates with the message: SYMBOL IN DATA followed by the invalid symbol.

READBOOLEAN

DEFINITION: This Boolean procedure searches the current input stream for one of the basic symbols true false ____ or _____. CALL: READ BOOLEAN No parameters. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

READCH

DEFINITION: This integer procedure reads one character from the currently selected input stream. The procedure reads any characters from the input, including the 'invisible' characters which READ SYMBOL ignores. CALL: READCH No parameters. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

READSYMBOL

DEFINITION: This procedure reads one symbol from the currently selected input stream and assigns it to the parameter I, which must be a variable. Only visible symbols are read by this procedure. CALL: READSYMBOL(I) I is an integer variable which is assigned when a symbol is read from the currently selected input stream. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character.

READ1900

DEFINITION: This real procedure is a version of the READ procedure which allows a single space within the number. It also ignores non-numeric characters before the start of the number and accepts '1O' and E in place of & or to introduce an exponent. CALL: READ1900 No parameters. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. If a non-numeric symbol is found when not expected then the program terminates with the message: SYMBOL IN DATA followed by the invalid symbol. NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

RWNDSQ

DEFINITION: This procedure resets the sequential file specified by the value of CH to the start of the first record. CALL: RWNDSQ(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. ERROR CONDITIONS: None.

SELECTINPUT

DEFINITION: This procedure selects input stream CH: subsequent calls of input procedures take information from stream CH unless and until a further call of this procedure selects a different stream. CALL: SELECT INPUT(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. Only one input stream may be selected at any time, and it may not be the same as the output stream. If a call of SELECT INPUT is made part way through reading a line of input the remainder of that line is lost. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED

SELECTOUTPUT

DEFINITION: This procedure selects output stream CH; subsequent calls of output procedures send information to stream CH unless and until a further call of this procedure selects a different stream. CALL: SELECT OUTPUT(CH) CH is an integer parameter called by value which specifies the channel number and whose value must be in the range allowed by the operating system being used. Only one output stream may be selected at any one time, and it may not be the same as the input stream. If a call of SELECT OUTPUT is made part way through a line of output, that partial line will be output as though the call of NEWLINE immediately preceded the call of SELECT OUTPUT. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

SIGN

DEFINITION: This integer procedure gives the sign of the value of E as an integer: SIGN(E) = +1 if E > 0 SIGN(E) = -1 if E < 0 SIGN(E) = 0 if E = 0 CALL: SIGN(E) E is a real parameter called by value. ERROR CONDITIONS: None.

SIN

DEFINITION: This real procedure gives the sine of E, where E is expressed in radians. CALL: SIN(E) E is a real parameter called by value. ERROR CONDITIONS: If the modulus of this argument is greater than 3.53 x 10 , the result would be wholly inaccurate and the program terminates with the following message: SIN ARG OUT OF RANGE

SKIPCH

DEFINITION: This procedure skips over one character of the input stream without reading it. CALL: SKIPCH No parameters. ERROR CONDITIONS: If an attempt is made to read more data than has been provided on the input stream, the program terminates with the following message: INPUT ENDED Invalid characters in the input stream are passed through by EMAS, but under VME/B are replaced by SUB and if SUB is detected by this procedure the program terminates with the following message: SUBSTITUTE CHARACTER IN DATA This fault will occur on attempting to read the first character of the line, %NOT necessarily the incorrect character. NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

SPACE

DEFINITION: This procedure outputs to the currently selected output stream one horizontal space. CALL: SPACE No parameters. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

SPACES

DEFINITION: This procedure outputs to the currently selected output stream N horizontal spaces, each space being equivalent to one character. CALL: SPACES(N) N is an integer parameter called by value. If N <= 0 then the procedure has no effect. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED

SQRT

DEFINITION: This real procedure gives the positive square root of E for E > 0. CALL: SQRT(E) E is a real parameter called by value. ERROR CONDITIONS: If a negative argument is passed to this routine, the program terminates with the following message: SQRT ARG NEGATIVE

STOP

DEFINITION: This procedure causes execution to cease by arranging a branch to the end begin ___ corresponding to the first _____ of the program. CALL: STOP No parameters. ERROR CONDITIONS: None.

WRITEBOOLEAN

DEFINITION: This procedure outputs the value of the Boolean expression to the currently selected output stream as true ____ followed by two spaces, or false _____ followed by one space. CALL: WRITE BOOLEAN(QU) QU is a Boolean parameter called by value. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.

WRITETEXT

DEFINITION: This procedure outputs the string ST to the currently selected output stream. CALL: WRITE TEXT(ST) ST is a string parameter. The editing characters S for space, C for newline, and P for newpage are accepted, enclosed in further string quotes. An editing character may be preceded by an unsigned integer N to indicate N such characters. ERROR CONDITIONS: If an attempt is made to output more data than has been specified for the current output stream, the program terminates with the following message: OUTPUT EXCEEDED NOTE: This is a 1900 ALGOL-compatible procedure provided for the convenience of programmers with working 1900 programs.