From Bohemia Interactive Community
|
|
(2 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| =Boolean Type=
| | '''Description:'''<br> |
| Boolean ([[true]] or [[false]]). | | A [[Boolean]] can either be [[true]] or [[false]]. |
| | | Note that Booleans are '''real''' types in the scripting language. |
| If left unmolested true and false are "strings";
| |
| | |
| In the scripting language (sqf/sqs) this is fine. The variable is [[compared]] as a string "true" or "false" or "bananas"
| |
| | |
| in config.cpp you need to first declare them for what they really are
| |
| | |
| #define true 1
| |
| #define false 0
| |
|
| |
|
| | In config.cpp (addons), a boolean is simply a poetic licence, a convenience, for a zero/non zero integer. |
|
| |
|
| [[Category: Data Types]] | | [[Category: Data Types]] |
Latest revision as of 18:02, 10 February 2021
Description:
A Boolean can either be true or false.
Note that Booleans are real types in the scripting language.
In config.cpp (addons), a boolean is simply a poetic licence, a convenience, for a zero/non zero integer.