float
A floating point number.
Details
The basic floating point number type.
Float constants can be inserted into the code as numbers containing a decimal point. Numbers without decimal point are considered to be integers.
Example
float f = 1.0 / 3.0
echo( f )
Output
0.33333333
Example
open float length{
name = "Length"
descr = "The length of the box"
value = 1.0
min = 0.5
}
make box( length, 1, 1 )
Casts To
Optional Open Parameter Attributes
- bool readonly
-
Tells the user interface or frontend to disable the setting of the open parameter.
- string style
-
Specifies some limited styling instructions for the user interface or frontend.
- float min
-
A floating point number that states that the open parameter value must not be below this value. This is enfored by the system.
- float max
-
A floating point number that states that the open parameter value must not be above this value. This is enfored by the system.
- float[] options
-
An array of floating point values that defines a selection of allowed values. The user interface or frontend may use a drop-down list to display this open parameter's control. The system enforces that the open parameter value is of the selection options.
- string[] options_texts
-
This attribute requires an options attribute to be present. The options_texts attribute is an array of string values that should ideally have the same length as the options array. Its function is to provide a short name or description for each of the options values. These may be used in the drop-down list by the user interface or frontend.