TLO:Bool
Creates a bool object using text. Value is set to TRUE unless text is "NULL" "FALSE" or "0" (capitalization does not count).
This TLO is added by MacroQuest
Forms
Type | Member | Description |
---|---|---|
bool | Bool[text] | Returns true unless text results in NULL, FALSE or 0 |
Access to Types
Type | Description |
---|---|
bool | Unlike bool in most programming and scripting languages, bool in MacroQuest is unique: Any non-zero value evaluates to true. However, 0 still equals false, and 1 still equals true. |
Examples
/declare MyVar bool
/varset MyVar ${Bool[This is true]}
/echo ${MyVar}
This would output TRUE
/declare MyVar bool
/varset MyVar ${Bool[NULL]}
/echo ${MyVar}
This would output FALSE