Difference between revisions of "Boolean or truth values"

 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
<languages />
+
<breadcrumbs>Analytica User Guide > Expressions > {{PAGENAME}}</breadcrumbs>
<translate>
 
[[Analytica User Guide]] > [[Using Expressions]] > [[Boolean or truth values]]
 
  
A '''''Boolean '''''or '''''truth '''''value can be '''True '''and '''False''', or, equivalently, the number 1 or 0. For example:
 
  
:'''False OR True '''&rarr;'''True'''
+
A '''''Boolean '''''or '''''truth '''''value can be <code>True</code> and <code>False</code>, or, equivalently, the number 1 or 0. For example:
 +
:<code>False OR True &rarr; True</code>
 +
:<code>1 AND 0 &rarr; False</code>
 +
:<code>1 OR 0 &rarr; True</code>
  
:'''1 AND 0 '''&rarr;'''False'''
+
It actually treats every nonzero number as <code>True</code>. For example:
 +
:<code>2 AND True &rarr; True</code>
  
:'''1 OR 0 '''&rarr;'''True'''
+
Boolean values are represented internally as the numbers 1 and 0. By default, a Boolean result displays as 0 or 1. To display them as <code>False</code> or <code>True</code>, change the number format of the variable to Boolean (see [[Number formats]]).
  
It actually treats every nonzero number as '''True'''. For example:
+
==See Also==
 +
* [[Logical Operators]]
 +
* [[Objects and Values]]
  
:'''2 AND True '''&rarr;'''True'''
 
  
Boolean values are represented internally as the numbers 1 and 0. By default, a Boolean result displays as 0 or 1. To display them as '''False '''or '''True''', change the number format of the variable to Boolean (see [[Number formats]]).
+
<footer>Date and Time Values / {{PAGENAME}} / Text values</footer>
 
 
==See Also==
 
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
 
|- style="text-align: center"
 
| [[Date and Time Values]] <- || [[Boolean or truth values]] || -> [[Text values]]
 
|}
 
</translate>
 

Latest revision as of 00:12, 1 June 2016


A Boolean or truth value can be True and False, or, equivalently, the number 1 or 0. For example:

False OR True → True
1 AND 0 → False
1 OR 0 → True

It actually treats every nonzero number as True. For example:

2 AND True → True

Boolean values are represented internally as the numbers 1 and 0. By default, a Boolean result displays as 0 or 1. To display them as False or True, change the number format of the variable to Boolean (see Number formats).

See Also


Comments


You are not allowed to post comments.