Real

See Also: Type Conversion Functions, Integer, Number, Round, String

Purpose

The Real function returns a value of type Real from a source of another data type.

Return Type

Real

Syntax

(Real( {expression} ))

What It Does

Real returns floating point (real) values from sources of other types.

Procedure Test

    Number nSide

    Real rArea

 

    Move 6.567 To nSide

    Move (Real(nSide ^ 2)) To rArea

End_Procedure

In this example, the value of number variable nSide is squared and moved to the real variable rArea in floating-point precision.

Real does not change the type of any value. It only affects the precision to which an expression is evaluated.

Notes

 

Number nSum nPopulation

Real rMean

Move (Real(nSum / nPopulation)) To rMean

This example would output the quotient of the nSum divided by nPopulation to the real variable rMean in full floating point precision.