Difference between revisions of "Core.Terms.ToFloat"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | ToFloat | To convert an expression to a Float | Term | OTX Core library | Conversion terms |...") |
(→Rules) |
||
Line 15: | Line 15: | ||
== Rules == | == Rules == | ||
* '''Boolean''' | * '''Boolean''' | ||
− | *: 1.0 | + | *: Returns 1.0, if {{FontColor|blue||true}}, otherwise 0.0 |
* '''Integer''' | * '''Integer''' | ||
*: Returns a float copy of the value | *: Returns a float copy of the value |
Revision as of 09:52, 14 August 2014
Contents
Classification
Name | ToFloat |
Short Description | To convert an expression to a Float |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
Value = ToFloat(Term)
Description
Term to the convert an expression to a Float.
Return Value
The Term returns the value, see table below.
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Float | Return value of the appropriate type. |
Rules
- Boolean
- Returns 1.0, if true , otherwise 0.0
- Integer
- Returns a float copy of the value
- Float
- Returns a copy of the value
- ByteField
- Returns the float value of the ByteFields. The interpretation according to IEEE 754:1985.
- String
- Returns the float value of the string. The string must correspond to a FloatLiteral. If not, an exception is thrown.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Term | - | Term | - | [1] | The expression to be converted. Rules, see description. |
Examples
MyFloatValue = ToFloat (true)
MyFloatValue = ToFloat ("1234")
MyFloatValue = ToFloat(123)
MyFloatValue = ToFloat(18 00 FF FF)