OTX Reference
|
|
Convert expression to Integer More...
Public Attributes | |
Term | term |
The expression (term) to be converted to Integer 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 Integer
The ToInteger
term returns the Integer
equivalent of the argument. If the argument is Boolean true
it returns 1
and Boolean false
it returns 0
. If the argument is FLoat
it returns the integer part (truncated) of the value. If the argument is ByteField
it returns the Integer
value of the byte field. For interpretation of the ByteField, little endian byte order and n-bit two's complement shall be used, where n is the ByteField's size multiplied by 8. If the argument is String
it returns the Integer
value of the string or throws an exception if this is not possible.
Boolean
Integer
Float
ByteField
String
Core.Exceptions.OutOfBoundsException | It is thrown in the ByteField case only: if the ByteField is empty or its size is greater than 8 bytes (in that case, the value space of xsd:long is exceeded, see Annex A). Conversions from Float INF, -INF or NAN shall result this exception, or if the value exceeds the value range of Integer. |
Core.Exceptions.TypeMismatchException | It is thrown in the String case only: if the String does not constitute an integer value literal. |
Term OpenTestSystem.Otx.Core.Terms.ToInteger.term |
The expression (term) to be converted to Integer