Float

See Also: Declaring Variables, Variable Declaration Commands, Struct

Purpose

Declares one or more Float (single precision 32 bit floating point) variables.

Syntax

To declare Float variables

Float {identifier} [… {identifier}]

Where

To declare array variables of type Float

Float{dimension-list} {identifier} […{identifier}]

Where

What It Does

The Float command declares Float variables. A Float is a 32-bit IEEE floating point number. The Float data type has Mantissa precision 7, 10-38 to 1038.

Multiple variables may be declared on one command line, with their names separated from each other by spaces.

Examples

Procedure DoTest

    Float fMyVar

 

    Move 3.9999 To fMyVar

End_Procedure

This example declares one variable of type Float, named fMyVar, and initializes it.

 

Float[] fPrecisionValues

This example declares 1 dynamic array variable, named fPrecisionValues, containing an undefined number of elements of type Float.

Float[5] fPrecisionValues

This example declares 1 static array variable, named fPrecisionValues, containing 5 of elements of type Float.

Float[][3] fPrecisionValues

This example creates a two-dimensional dynamic array variable named fPrecisionValues, containing an undefined number of elements of type Float. Conceptually, this represents a rectangular array with an undefined number of rows, each of 3 columns.

You can declare dynamic multi-dimensional arrays where all dimensions are dynamic; these are called jagged arrays.

Notes