Difference between revisions of "Core.Terms.ToBoolean"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''ToBoolean'''}}[[Category:Core]] | {{DISPLAYTITLE:OTX '''ToBoolean'''}}[[Category:Core]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | ToBoolean | | + | {{ClassificationActivity | ToBoolean | Converts an OTX term to a value of the Boolean data type | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} |
== OTL Syntax == | == OTL Syntax == | ||
Line 9: | Line 9: | ||
== Description == | == Description == | ||
− | + | This term shall return the Boolean counterpart of the argument term. | |
− | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Returns the Boolean counterpart of the argument term.}} |
== Rules == | == Rules == | ||
Line 28: | Line 28: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | Represents the | + | {{TableRowPropertie1| Term | - | [[Term]] | - | [1] | Represents the OTX term that shall be converted to a new value of the Boolean data type.}} |
|} | |} | ||
Revision as of 03:10, 26 April 2019
Contents
Classification
Name | ToBoolean |
Short Description | Converts an OTX term to a value of the Boolean data type |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanTerm = Conversion.ToBoolean(Term);
Description
This term shall return the Boolean 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 |
Boolean | Returns the Boolean counterpart of the argument term. |
Rules
- Boolean
- Returns a copy of the value
- Integer
- If 0, return false , otherwise true
- Float
- If 0.0, return false , otherwise true
- ByteField
- If empty, return false , otherwise true
- String
- If the value of the string "True", and not taken into account - insensitive will return true , otherwise false
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 Boolean data type. |
OTL Examples
Boolean Boolean1;
Boolean Boolean2;
Boolean Boolean3;
Boolean1 = Conversion.ToBoolean(0);
Boolean2 = Conversion.ToBoolean("true");
Boolean3 = Conversion.ToBoolean("false");