Boolean: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{stub}}
A boolean is a binary value, indicating either a "true" or a "false".
A boolean is a binary value, indicating either a "true" or a "false".


Line 16: Line 15:
===Presence===
===Presence===
For some functionalities, the presence of an attribute is used, rather than the actual value of that attribute. This is referred to as a "boolean by presence". In these cases, if the attribute is not present, it's considered a logical "False". If the attribute is present, it's considered a logical "True".
For some functionalities, the presence of an attribute is used, rather than the actual value of that attribute. This is referred to as a "boolean by presence". In these cases, if the attribute is not present, it's considered a logical "False". If the attribute is present, it's considered a logical "True".
 
{{article end
|seealso=
* [[Attribute]]
* [[Active]]
}}
[[Category:unit]]
[[Category:unit]]

Latest revision as of 15:54, 21 February 2023

A boolean is a binary value, indicating either a "true" or a "false".

In general, only a value of 0 or 1 is allowed. Any other value may cause undefined behavior, though as a rule of thumb any positive value is interpreted as "true".

Value Meaning
0 False (No)
1 True (Yes)

Presence

For some functionalities, the presence of an attribute is used, rather than the actual value of that attribute. This is referred to as a "boolean by presence". In these cases, if the attribute is not present, it's considered a logical "False". If the attribute is present, it's considered a logical "True".

See also