PrF UG slots value type float
The Float Value Type
A slot of type Float has numbers as values; these numbers may include a decimal point. Values of type Float are stored on your system as floating-point values, and are only as accurate as the representation used by your system.
Setting the Value Type to Float
To set the value type of a slot to Float:
Create the slot, or view the Slot Editor for an existing slot.
Select Float from the Value Type menu.
Fill in the other facets of the slot as desired.
Minimum and Maximum Values
For slots of type Float, you can enter a Minimum and/or Maximum value. See The Slot Editor for more information:
Minimum allows you to specify a minimum value for your slot. When an instance is created for a class with this slot, the value of the slot must be greater than or equal to the minimum. For example, a minimum of zero means instances cannot have negative values.
Maximum allows you to specify a maximum value for your slot. When an instance is created for a class with this slot, the value of the slot must be less than or equal to the maximum.
Together, Minimum and Maximum can be used to define an allowable range.
When present, the Minimum and/or Maximum values are displayed in the last column of the Template Slots pane.
Entering Floating-Point Numbers for an Instance
When entering a Float value for an instance, you can use decimal point or exponential representation. You can enter positive and negative values. For example:
Representation | Description |
---|---|
1234.56 | Standard decimal notation. |
1.23456E3 or 1.2345e3 |
Exponential notation; the example is shorthand for 1.23456 · 103. Represents 1234.56 (For convenience in typing, you can enter a lower case e, instead of an uppercase E.) |
-1234.56 | Negative number. |
1.23456E-3 or 1.2345e-3 |
Exponential notation with a negative exponent, shorthand for 1.23456 · 10-3. Represents 0.00123456. |