Core.Terms.ToInteger
Jump to navigation
Jump to search
Contents
Classification
Name | ToInteger |
Short Description | To convert an expression to a Integer |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
Value = ToInteger(Term)
Description
Term to the convert an expression to a Integer.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Integer | Return value of the appropriate type. |
Rules
- Boolean
- Returns 1 if true , otherwise 0
- Integer
- Returns a copy of the value
- Float
- Return the integer part (value) left beside the point. The decimal part is this truncated and not rounded.
- ByteField
- Returns the integer value of the ByteFields. The byte sequence is interpreted unsigned.
- String
- Returns the integer value of the string. The string must conform to an IntegerLiteral. 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
MyIntegerValue = ToInteger (true)
MyIntegerValue = ToInteger ("1234")
MyIntegerValue = ToInteger(123.456)
MyIntegerValue = ToInteger(18 00 FF FF)