Difference between revisions of "Core.Terms.ToFloat"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
== Description == | == Description == | ||
− | This term | + | This term will return the Float counterpart of the argument term. |
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Float|Float]] | Returns the Float counterpart of the argument term.}} | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Float|Float]] | Returns the Float counterpart of the argument term.}} | ||
Line 28: | Line 28: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | Represents the OTX term that | + | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | Represents the OTX term that will be converted to a new value of the Float data type. See conversion rule descriptions above.}} |
|} | |} | ||
Revision as of 08:16, 26 April 2019
Contents
Classification
Name | ToFloat |
Short Description | Converts an OTX term to a value of the Float data type |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
FLoatTerm = COnversion.ToFloat(Term);
Description
This term will return the Float counterpart of the argument term.
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 | Returns the Float counterpart of the argument term. |
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] | Represents the OTX term that will be converted to a new value of the Float data type. See conversion rule descriptions above. |
Examples
Float Float1;
Float Float2;
Float Float3;
Float Float4;
Float1 = Conversion.ToFloat(true);
Float2 = Conversion.ToFloat("1234");
Float3 = Conversion.ToFloat(123);
Float4 = Conversion.ToFloat(&18 00 FF FF);