Difference between revisions of "Core.Terms.ToBoolean"
Jump to navigation
Jump to search
m (Hb moved page ToBoolean to Core.Terms.ToBoolean: #3153) |
|||
Line 1: | Line 1: | ||
− | [[Category:Core]] | + | {{DISPLAYTITLE:OTX '''ToBoolean'''}}[[Category:Core]] |
== Classification == | == Classification == | ||
{{ClassificationActivity | ToBoolean | To convert an expression to a Boolean | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} | {{ClassificationActivity | ToBoolean | To convert an expression to a Boolean | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} | ||
Line 11: | Line 11: | ||
Term to the convert an expression to a Boolean. | Term to the convert an expression to a Boolean. | ||
− | {{TermReturnValue| [[Boolean]] | Return value of the appropriate type.}} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Return value of the appropriate type.}} |
== Rules == | == Rules == | ||
Line 43: | Line 43: | ||
== See also == | == See also == | ||
− | [[ToInteger]] <br/> | + | [[Core.Terms.ToInteger|ToInteger]] <br/> |
− | [[ToFloat]] <br/> | + | [[Core.Terms.ToFloat|ToFloat]] <br/> |
− | [[ToByteField]] <br/> | + | [[Core.Terms.ToByteField|ToByteField]] <br/> |
− | [[ToString]] | + | [[Core.Terms.ToString|ToString]] |
Revision as of 05:24, 5 February 2016
Contents
Classification
Name | ToBoolean |
Short Description | To convert an expression to a Boolean |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanTerm = Conversion.ToBoolean(Term);
Description
Term to the convert an expression to a Boolean.
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 | Return value of the appropriate type. |
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] | The expression to be converted. Rules, see description. |
OTL Examples
Boolean Boolean1;
Boolean Boolean2;
Boolean Boolean3;
Boolean1 = Conversion.ToBoolean(0);
Boolean2 = Conversion.ToBoolean("true");
Boolean3 = Conversion.ToBoolean("false");