Equinox Online Help - Language Reference - A to Z

Home

Number

Applies to
SyntaxNumber VariableDescriptions
Action[Statement] Declares number variables.
ScopeUsable anywhere.
Notes

This statement declares number variables. A new variable can be described using one of the three following formats:

  • VariableName
  • VariableName (number of decimal places)
  • VariableName (length, number of decimal places)

VariableName is the name of the new variable. Number of decimal places is the number of decimal places that the variable can hold and length is its total size. Both must be number constants. If either value is omitted, Equinox assigns restrictive defaults. You should always use the smallest possible length and number of decimal places, as it makes Equinox more efficient.

Equinox uses the IEEE decimal format (a binary format) that only represents decimal fractions to 13 significant digits. Method language that tries to use more than this will either not work or will degrade in accuracy quickly.

Many number variables can be declared using one number statement by adding further variable descriptions, separated by commas.

CategoryDeclarations
See Also Date, Define, Logical, Memo
Example

The following example declares two variables which can store any number.

number total, x

The variable in the next declaration, can store numbers in the range -99 to 99 with no decimal places.

number x(2, 0)

The last declaration creates a variable which can store any number, but does not store decimal places.

number pence(0)