Float
This keyword declares a floating value with a precision that may depend on the hardware. It is therefore strongly recommended not to use this keyword anymore, and to replace it with Decimal variables.
Local Float NAMELocal Float NAME(DIMENSIONS)Variable Float NAME(DIMENSIONS)Value Float NAME(DIMENSIONS)Const Float NAME(DIMENSIONS)
NAME
is the name of the variable declaredDIMENSIONS
can be:Several variable declarations can be done on the same line, separated by a comma.
Local declarations create the variables in the current local variable class that is not seen by nested or calling subprograms. The Call / Subprog and func / Funprog insulate the local variables, as well as the calls of method by fmet.
Const, Variable, and Value declarations declare the arguments sent by a Call, func, or fmet. With these syntaxes, the dimensions and the index ranges can be omitted when the parenthesis is present. The dimension and index ranges are defined by the calling program.
# Direct declarationsLocal Float CURRENCY_RATE, EOF_RATE : # Local floating point variablesLocal Float WEIGHTING_MEASURES(1..12) : # An array of 12 floating point values# A sub-program computing a result from floating points values Funprog COMPUTE_VALUE(MEASURES)Variable Float MEASURES(,) : # A 2 dimensions matrix of floating point variables is sent as reference...End SEND_STATUS# A sub-program storing floating point valuesSubprog STORE_VALUES(VOLTAGE_MEASURES)Value Float VOLTAGE_MEASURES(1..20) : # An array of 20 elements is sent (a copy is done when passing the arguments)...End
There is still a Global declaration variable that exists for variables that must be seen in the scope of a process execution, but its use is strongly discouraged.
# Declare Float and assign valueLocal Float MY_FLOAT MY_FLOAT = 42949672951# Value retrieved = 4.29497e+10
Global, Local, Variable, Value, Const, Tinyint, Date, Shortint, Integer, Double, Decimal, Char, Clbfile, Blbfile, Uuident, Datetime, Instance.