Chapter 4. Reference to Data

Table of Contents
Numeric Types
Simple References
Array References
Packed Data
Storage Allocation
Presetting
Preservation of Values
Overlay Declarations

Numeric Types

There are three types of number, floating-point, fixed-point and integer. Except in certain part-word table-elements (see ), all three types are signed. Numeric type is indicated by the word FLOATING or INTEGER or by the word FIXED followed by the scaling constants which must be given numerically, e.g.


          FIXED(13,5)

        

This specifies five fractional bits and a minimum of 13 bits to represent the number as a whole, including the fractional bits and sign. The number of fractional bits may be negative, zero, or positive, and may cause the binary point to fall outside the significant field of the number. It is assumed throughout this definition that a number is confined within a single computer word. If, in any implementation, a different system is adopted, e.g. two words for a floating point number, a systematically modified interpretation of the language definition will be necessary. The syntax for numeric type is


        Numbertype ::= 
    FLOATING
        FIXED
        Scale
        INTEGER
      


        Scale ::=  ( Totalbits , Fractionbits ) 
      


        Totalbits ::= Integer
      


        Fractionbits ::= Signedinteger