FLOAT (Reserved Word)

image\trumpet2.gif Disclaimer

The float reserved word used in a variable declaration statement to explicitly set the data type of a variable to single-precision (32-bit) floating point.  The data type of a variable in the main body of an EasyLanguage document is automatically set to floating point if the initial value parameter is determined to be a floating point numeric value.

A variable of this type can have a floating point numeric value.

Remarks

The float keyword is an alias of the elsystem.real32 class and allows you to use the methods associated with that class (such as .ToString) on variables declared with the float data type.

Example

In the main body of a document:

Var: FLOAT MyVar1(345.67);  // in this case, the data type is optional and the initial value is required

In a method:

Var: float MyVar2;          // in this case, the data type is required and no initial value is allowed

  See Variable for other syntax parameters.