Difference between revisions of "Core.Terms.ToInteger"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''ToInteger'''}}[[Category:Core]] | {{DISPLAYTITLE:OTX '''ToInteger'''}}[[Category:Core]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | ToInteger | | + | {{ClassificationActivity | ToInteger | Converts an OTX term to a value of the Integer data type | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} |
== OTL Syntax == | == OTL Syntax == | ||
Line 9: | Line 9: | ||
== Description == | == Description == | ||
− | + | This term shall return the Integer counterpart of the argument term. | |
− | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | Returns the Integer counterpart of the argument term.}} |
== Rules == | == Rules == | ||
Line 28: | Line 28: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | | + | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | Represents the OTX term that shall be converted to a new value of the Integer data type.}} |
|} | |} | ||
Revision as of 04:37, 26 April 2019
Contents
Classification
Name | ToInteger |
Short Description | Converts an OTX term to a value of the Integer data type |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
IntegerTerm = Conversion.ToInteger(Term);
Description
This term shall return the Integer 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 |
Integer | Returns the Integer counterpart of the argument term. |
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] | Represents the OTX term that shall be converted to a new value of the Integer data type. |
OTL Examples
Integer Integer1;
Integer Integer2;
Integer Integer3;
Integer Integer4;
Integer1 = Conversion.ToInteger(true);
Integer2 = Conversion.ToInteger("1234");
Integer3 = Conversion.ToInteger(123.456);
Integer4 = Conversion.ToInteger(&18 00 FF FF);