Real

See Also: Declaring Variables, Variable Declaration Commands, Struct, Integer, Number, Real Function

Purpose

Declares one or more Real (floating-point numeric) variables.

Syntax

To declare real variables

Real {identifier} […{identifier}]

Where

To declare array variables of type Real

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

Where

What It Does

Real defines in-memory variables which are to contain numeric type data in floating-point format. Real variables allow for 16 significant digits and an order of magnitude of ±306. A Real variable can have any value in the range of ±9.99,999,999,999,999,999 * 10^±306.

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

Examples

Procedure DoTheMath

    Real rAsymptote rGradient rAbscissa

End_Procedure

In this example, three Real variables, rAsymptote, rGradient, and rAbscissa, are declared.

 

Real[] rBattingAverages

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

Real[5] rBattingAverages

This example declares 1 static array variable, named rBattingAverages, containing 5 of elements of type real.

Real[][3] rBattingAverages

This example creates a two-dimensional dynamic array variable named rBattingAverages, containing an undefined number of elements of type real. 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