OTX Reference
|
|
Convert expression to Float More...
Public Attributes | |
Term | term |
The expression (term) to be converted to Float More... | |
Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term | |
MetaData | metaData |
Cardinality [0..1] The MetaData type allows tools to store additional, mainly tool-specific data. More... | |
Convert expression to Float
The ToFloat
term returns the Float
equivalent of the argument. If the argument is Boolean true
it returns 1.0
and Boolean false
it returns 0.0
. If the argument is Integer
it returns a Float
copy of the value. If the argument is ByteField
it returns the Float
equivalent according to IEEE 754: 2008 with double precision. If the argument is String
it returns the Float
value of the string or throws an exception if this is not possible.
Boolean
Integer
Float
ByteField
String
Core.Exceptions.TypeMismatchException | It is thrown in the String case only: if the String does not constitute a float value literal. |
Core.Exceptions.OutOfBoundsException | It is thrown in the ByteField case only: if the ByteField's bit-size is neither 32 bit nor 64 bit (i.e. the value cannot be interpreted as single or double precision according to IEEE 754:2019). |
Term OpenTestSystem.Otx.Core.Terms.ToFloat.term |
The expression (term) to be converted to Float