See Also: Declaring Variables, Variable Declaration Commands, Struct, Number Function
Declares one or more Number variables.
To declare Number variables
Number {identifier} […{identifier}]
Where
Where {identifier} is a variable name for the new number variable.
{identifier} may be between 1 and 4096 characters in length, must start with a letter, and may not contain spaces. Recommended characters are 0-9, a-z, A-Z and _ (underscore).
To declare array variables of type Number
Number{dimension-list} {identifier} […{identifier}]
Where
{dimension-list} is a list of one or more array dimensions for the array. A dimension list is declared using square brackets []. One pair of brackets is used to declare each dimension. If the array is static, then you must specify the static size of each dimension between each pair of brackets. i.e. [{size}]. For more information about declaring arrays refer to Array Variable Assignments.
{identifier} may be between 1 and 4096 characters in length, must start with a letter, and may not contain spaces. Recommended characters are 0-9, a-z, A-Z and _ (underscore).
Number defines in memory variables which are to contain numeric type data. Numeric variables allow for 14 digits to the left of the decimal point and eight to the right of the decimal point.
A Number variable can contain any value in the range of -99999999999999.99999999 to 99999999999999.99999999 (-99,999,999,999,999.99999999 to 99,999,999,999,999.99999999).
Multiple variables may be declared on one command line, with their names separated from each other by spaces..
Procedure CalculateTotal
Number nQuantity nTot nSum nAmount
…
End_Procedure
In this example, four variables of type Number variables are declared:. nQuantity, nTot, nSum, and nAmount.
Number[] nCreditBalances
This example declares 1 dynamic array variable, named nCreditBalances, containing an undefined number of elements of type number.
Number[5] nCreditBalances
This example declares 1 static array variable, named nCreditBalances, containing 5 of elements of type number.
Number[][3] nCreditBalances
This example creates a two-dimensional dynamic array variable named nCreditBalances, containing an undefined number of elements of type number. 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.
When a calculation exceeds the precision capacity of Type Number (eighth digit to the right of the decimal point), the rightmost digit is not rounded. The digits to its right are simply truncated.
If you need to define a global Number variable, you should use the global_variable command to do so.