Difference between revisions of "Core.Terms.ToBoolean"
Jump to navigation
Jump to search
(→Rules) |
(→Rules) |
||
Line 17: | Line 17: | ||
*: Returns a copy of the value | *: Returns a copy of the value | ||
* '''Integer''' | * '''Integer''' | ||
− | *: If 0, return | + | *: If 0, return {{FontColor|blue||false}}, otherwise {{FontColor|blue||true}} |
* '''Float''' | * '''Float''' | ||
− | *: If 0.0, return | + | *: If 0.0, return {{FontColor|blue||false}}, otherwise {{FontColor|blue||true}} |
* '''ByteField''' | * '''ByteField''' | ||
− | *: If empty, return | + | *: If empty, return {{FontColor|blue||false}}, otherwise {{FontColor|blue||true}} |
* '''String''' | * '''String''' | ||
− | *: | + | *: If the value of the string "True", and not taken into account - insensitive will return {{FontColor|blue||true}}, otherwise {{FontColor|blue||false}} |
== Properties == | == Properties == |
Revision as of 09:42, 14 August 2014
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 |
Pseudo-Code Syntax
Value = 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. |
Examples
MyBooleanValue = ToBoolean(0)
MyBooleanValue = ToBoolean ("true")
MyBooleanValue = ToBoolean ("false")