ObjectType:bool
Jump to navigation
Jump to search
bool | |
Defined By | LavishScript |
Inherits | none |
Reduces To | TRUE or FALSE |
Variable Object Type | bool |
Uses Sub-Types | no |
C/C++ Type | unsigned int |
Contents
Description
Short for boolean, a bool groups all numbers into exactly two categories, one called TRUE and one called FALSE. The TRUE category is made up of all numbers except for zero, and the FALSE category is made up of only zero.
Members
- bool Not: Gives the opposite value, e.g. if the value is TRUE, Not is FALSE
- bool Equal[calculation]: TRUE if the boolean value matches the boolean result of the calculation (zero is FALSE, non-zero is TRUE)
- string AsJSON: A string containing true or false as would be specified in JSON
Methods
- Toggle: Toggles between TRUE and FALSE
- Set[formula]: Sets this bool to a specific value
Examples
Declare a boolean variable
- declare Boo1 bool FALSE
Set a boolean value
- Boo1:Set[TRUE]
Toggle a boolean value
- Boo1:Toggle
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate