Standard Procedures
KEY
The standard procedures are those provided automatically, i.e. no
specification statements are required for them. The standard procedures
are listed below, with an indication of where their descriptions may be
found: either a section number of this manual, or "I-S" meaning that the
procedure's precise effect is implementation-specific. The relevant
documents for various implementations of IMP80 are given in Appendix B.
Notes
* At the time of writing, existing implementations of IMP80 do not have
a complete common set of standard procedures. The first list below
includes procedures common to all the implementations. The other
lists relate to specific implementations.
* A standard procedure will not be provided in an implementation if it
is a function or map, or has a parameter, of a type not provided in
the implementation.
* Implementations of IMP80 may provide procedures other than those
listed here which do not require specification statements. In
addition, various libraries of external procedures may be provided.
These are not included here; consult the relevant documentation for
details.
* Two named constants are predefined:
%constant %integer NL = {value for newline char. ISO value is} 10
%constant %long %real PI = 3.141592653589793
* {EMAS IMP80: a standard procedure can be intrinsic. An intrinsic
procedure is one which is compiled as part of the program (for reasons
of efficiency) rather than being separately compiled. Intrinsic
procedures cannot be passed as parameters. The standard procedures
which are intrinsic are noted in Appendix B.}
Standard Procedures
KEY
Type Name and parameter list Reference
%integer %function ADDR(%name A) 6
%byte %integer %map BYTE INTEGER(%integer I) 6
%integer %map CHAR NO(%string(*)%name S, %integer I) 2
%long %real %function FLOAT(%integer I) 2
%long %real %function FRAC PT(%long %real A) 2
%half %integer %map HALF INTEGER(%integer I) 6
%integer %function IMOD(%integer I) 2
%integer %function INT(%long %real A) 2
%integer %function INT PT(%long %real A) 2
%integer %map INTEGER(%integer I) 6
%byte %integer %map LENGTH(%string(*)%name S) 2
%long %integer %map LONG INTEGER(%integer I) 6
%long %long %real %map LONG LONG REAL(%integer I) 6
%long %real %map LONG REAL(%integer I) 6
%long %real %function MOD(%long %real A) 2
%routine NEW LINE 5
%routine NEW LINES(%integer I) 5
%integer %function NEXT SYMBOL 5
%routine PRINT(%long %real A, %integer I, J) 5
%routine PRINT FL(%long %real A, %integer I) 5
%routine PRINT STRING(%string(*) S) 5
%routine PRINT SYMBOL(%integer I) 5
%routine READ(%name A) 5
%routine READ SYMBOL(%name I) 5
%real %map REAL(%integer I) 6
%record %map RECORD(%integer I) 6
%routine SELECT INPUT(%integer I) 5
%routine SELECT OUTPUT(%integer I) 5
%short %integer %map SHORT INTEGER(%integer I) 6
%integer %function SIZE OF(%name A) 2
%routine SKIP SYMBOL 5
%routine SPACE 5
%routine SPACES(%integer I) 5
%string(*)%map STRING(%integer I) 6
%string(*)%function SUBSTRING(%string(*)%name S,
%integer I, J) 2
%string(*)%function TO STRING(%integer I) 2
%routine WRITE(%integer I, J) 5
EMAS IMP80-Specific Procedures
KEY
Type Name and parameter list Reference
%long %real %function ARC COS(%long %real A) I-S
%long %real %function ARC SIN(%long %real A) I-S
%long %real %function ARC TAN(%long %real A, B) I-S
%array %map ARRAY(%integer I, %array %format A) 6
%routine CLOSE STREAM(%integer I) 5
%long %real %function COS(%long %real A) I-S
%long %real %function COT(%long %real A) I-S
%long %real %function EXP(%long %real A) I-S
%integer %function EVENT INF(%integer I) 3
%integer %function EVENT LINE(%integer I) 3
%long %integer %functionLENGTHEN I(%integer I) I-S
%long %long %real %function LENGTHEN R(%long %real R) I-S
%long %integer %functionLINT(%long %long %real I) I-S
%long %integer %functionLINT PT(%long %long %real I) I-S
%long %real %function LOG(%long %real A) I-S
%routine NEW PAGE 5
%integer %function NEXT CH 5
%string(*)%function NEXT ITEM 5
%routine PRINT CH(%integer I) 5
%long %real %function RADIUS(%long %real A, B) I-S
%routine READ CH(%name I) 5
%routine READ ITEM(%string(*)%name S) 5
%routine READ STRING(%string(*)%name S) 5
%integer %function SHORTEN I(%long %integer I) I-S
%long %real %function SHORTEN R(%long %long %real R) I-S
%long %real %function SIN(%long %real A) I-S
%long %real %function SQRT(%long %real A) I-S
%long %real %function TAN(%long %real A) I-S
IMP77-Specific Procedures
KEY
Type Name and parameter list Reference
%routine CLOSE INPUT 5
%routine CLOSE OUTPUT 5
%record %format EVENT FM(%integer EVENT, SUB, EXTRA) 3
%record(EVENT FM)%map EVENT 3
%integer %function REM(%integer A, B) I-S
%routine RESET INPUT 5
%routine RESET OUTPUT 5
%integer %function TYPE OF(%name A) I-S