MAINSAIL Language Manual, Appendix J

previous   next   top   contents   index   framed top   this page unframed


J. Restrictions

This appendix lists restrictions on sizes of MAINSAIL objects and values allowed in operations. It is not a complete list. Each operating-system-dependent MAINSAIL user's guide may contain additional implementation-dependent restrictions. The operating-system-dependent MAINSAIL user's guide also lists the size of the data types on that implementation.

J.1. Portable Data Type Ranges and Data Structure Size Limits

The portable ranges of the MAINSAIL data types and size limits of the MAINSAIL data structures are shown in Table J–1. The limits listed are inclusive. The sizes listed for data structures are subject to the availability of sufficient memory to contain the data structures.

The data section size includes all own variables, not just interface variables, and possibly hidden variables not declared by the programmer as well.

Table J–1. Portable Data Type Ranges and Data Structure Size Limits
Type or Structure Portable Range
BOOLEAN TRUE or FALSE
INTEGER -2147483647 to +2147483647
LONG INTEGER -2147483647 to +2147483647
REAL 1.0E-38 to 1.0E+38, six decimal digits
LONG REAL 1.0E-38 to 1.0E+38, eleven decimal digits
STRING 0 to 2147483647 eight-bit characters
ARRAY, one dimension bounds -2147483647 to +2147483647
ARRAY, two or three dimensions see Section 12.7
Record no size limitation
CLASS no size limitation

J.2. Interface PROCEDUREs in a MODULE

A limit as low as 1600 interface PROCEDUREs per MODULE may be imposed. A compiler error message is issued if the limit is exceeded.

J.3. Local Variable Limitations

A limit as low as 255 parameters and local variables per PROCEDURE may be imposed. A compiler error message is generated if this limit is exceeded. Temporaries generated by the compiler are counted in the limit.

J.4. STRING Constants in a MODULE

The number of different STRING constants allowed in a MODULE is 4095.

J.5. Size of a PROCEDURE

Each implementation may place an upper limit on the size of a PROCEDURE. Such limits are usually reasonably large, but not necessarily lavish. It is difficult to translate such limits into a quantity readily observable by the programmer, e.g., number of statements.

J.6. Number of Cases in a CASE Statement

A CASE statement may contain any number of selectors in the range -2147483647 to 2147483647, provided the maximum PROCEDURE size is not exceeded.

J.7. Uninitialized Variables

Operations using the values of uninitialized variables have undefined results. Especial care is required for (LONG) REAL values, since some bit patterns may not represent valid (LONG) REAL values.

Outer variables, the contents of dynamic records, dynamic ARRAYs, and data sections, and local variables of types POINTER, STRING, $PROCVAR, inplace record, and inplace ARRAY (but not of other data types), are always initialized by MAINSAIL to Zero. Thus, only local variables of types other than POINTER, STRING, $PROCVAR, inplace record, and inplace ARRAY can be uninitialized.

J.8. INIT Statements

INIT statement bracketed counts are limited to 2147483647.

J.9. FOR-Clause Limit Values

The largest (LONG) INTEGER must not be used as a limit value in an UPTO FOR-clause, nor the most negative (LONG) INTEGER as a limit value in a DOWNTO FOR-clause.
previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Appendix J