MQL4 Reference Language Basics Data Types Integer Types Bool Type
Bool TypeThe bool type is intended to store the logical values of true or false, numeric representation of them is 1 or 0, respectively. Examples:
The internal representation is a whole number 1 byte large. It should be noted that in logical expressions you can use other integer or real types or expressions of these types - the compiler will not generate any error. In this case, the zero value will be interpreted as false, and all other values - as true. Examples:
See also Boolean Operations, Precedence Rules |