Jump to content

Boolean values: Difference between revisions

no edit summary
(→‎{{header|D}}: add implementation)
No edit summary
Line 18:
{{works with|QuickBasic|4.5}}
 
QuickBasic has no keywords for true and false. Boolean expressions evaluate to 0 when false, and a non-zero value (default of negative one) when true. Numbers also work in place of boolean expressions following those rules.
 
=={{header|C}}==
Line 28:
* in C99, the boolean type <code>bool</code> (defined in header <tt><stdbool.h></tt>), where <code>true</code> gives true and <code>false</code> gives false
* in C99, any [[Complex numbers|complex number]] type, where 0 (0 real and 0 imaginary) gives false, anything else gives true
* The default value of true is 1.
 
=={{header|C++}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.