![]() |
Appendix 1. Modula-2 standard proceduresABSThe function ABS is used to obtain the absolute value of a value of a real number type or a whole number type. The Function CAPThe function CAP is used to obtain the upper-case equivalent of a lower-case character for those characters that have such equivalents. CHRThe function CHR is used to obtain the value of the character type that has a specified ordinal number. CMPLXThe function CMPLX is used to obtain a value of a complex number type from a pair of expressions specifying its real and imaginary parts. DECThe procedure DEC is used to decrement the value of a variable that is of an ordinal type. DISPOSEThe procedure DISPOSE is used to release an area of dynamically allocated storage that was earlier claimed by a call to the procedure NEW. Use of this procedure requires that the identifier DEALLOCATE is visible at the point of the call of DISPOSE (you can import DEALLOCATE from the module STORAGE). EXCLThe procedure EXCL is used to remove an element from a variable that is of a set type or a packedset type. FLOATThe function FLOAT is used to obtain a value of the real type from a value of a real number type or a whole number type. HALTThe procedure HALT is used to terminate the execution of a program at a point other than the end of the program block. HIGHThe function HIGH is used to obtain the upper bound of the index type of a one-dimensional open array formal parameter, or the upper bound of an index type of a multi-dimensional open array formal parameter. IMThe function IM is used to obtain the imaginary part of a value of a complex number type. INCThe procedure INC is used to increment the value of a variable that is of an ordinal type. INCLThe procedure INCL is used to add an element to a variable that is of a set type or a packedset type. INTThe function INT is used to obtain a value of the signed type from a value of an ordinal type or a real number type. LENGTHThe function LENGTH is used to obtain the length of a string value. LFLOATThe function LFLOAT is used to obtain a value of the long real type from a value of a real number type or a whole number type. MAXThe function MAX is used to obtain the maximum value of a scalar type. MINThe function MIN is used to obtain the minimum value of a scalar type. NEWThe procedure NEW is used to obtain an area of dynamically allocated storage that is to be bound to a variable that is of a pointer type. Use of this procedure requires that the identifier DEALLOCATE is visible at the point of the call of DISPOSE (you can import ALLOCATE from the module STORAGE). ODDThe function ODD is used to determine whether a value of a whole number type is even or odd. ORDThe function ORD is used to obtain the ordinal number of a value of an ordinal type. REThe function RE is used to obtain the real part of a value of a complex number type. SIZEThe function SIZE is used to ascertain the amount of storage that is used for a variable of a particular type. TRUNCThe function TRUNC is used to obtain a value of the unsigned type from a value of a real number type. VALThe function VAL is used to obtain a value of a specified scalar type from an expression of a scalar type.
|