[Next] [Up] [Previous]

The SCALED Statement

The SCALED statement has the form

       SCALED.n variable,variable...

and is similar to the FIXED_POINT statement, except that instead of assuming integers to have n decimal places, they are assumed to be in units of 1/n. Thus, SCALED.1000 is the same as FIXED_POINT.3.

Note that in FALCON, unlike ADA, fixed-point and scaled variables are guaranteed to be exact. Also, EQUIVALENCEing an integer variable to a fixed point/scaled variable of the same type is guaranteed to produce the expected result: the ratio of their nominal values will always be the scale factor, and causing an integer variable to be fixed point/scaled will not change its internal representation in any way other than the imposition of a scale factor.


[Next] [Up] [Previous]