HOME

TheInfoList



OR:

In computer science, the Boolean (sometimes shortened to Bool) is a
data type In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most prog ...
that has one of two possible values (usually denoted ''true'' and ''false'') which is intended to represent the two truth values of
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premises ...
and
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values ''true'' and ''false'', usually denoted 1 and 0, whereas i ...
. It is named after
George Boole George Boole (; 2 November 1815 – 8 December 1864) was a largely self-taught English mathematician, philosopher, and logician, most of whose short career was spent as the first professor of mathematics at Queen's College, Cork in Ire ...
, who first defined an algebraic system of logic in the mid 19th century. The Boolean data type is primarily associated with conditional statements, which allow different actions by changing
control flow In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an ''im ...
depending on whether a programmer-specified Boolean ''condition'' evaluates to true or false. It is a special case of a more general ''logical data type—''logic does not always need to be Boolean (see
probabilistic logic Probabilistic logic (also probability logic and probabilistic reasoning) involves the use of probability and logic to deal with uncertain situations. Probabilistic logic extends traditional logic truth tables with probabilistic expressions. A diffic ...
).


Generalities

In
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
s with a built-in Boolean data type, such as Pascal and
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's most ...
, the comparison operators such as > and are usually defined to return a Boolean value. Conditional and
iterative Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. ...
commands may be defined to test Boolean-valued expressions. Languages with no explicit Boolean data type, like C90 and
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
, may still represent truth values by some other data type. Common Lisp uses an empty
list A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby union ...
for false, and any other value for true. The C programming language uses an
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language o ...
type, where relational expressions like i > j and logical expressions connected by && and , , are defined to have value 1 if true and 0 if false, whereas the test parts of if, while, for, etc., treat any non-zero value as true. Indeed, a Boolean variable may be regarded (and implemented) as a numerical variable with one binary digit (
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented ...
), or as a bit string of length one, which can store only two values. The implementation of Booleans in computers are most likely represented as a full
word A word is a basic element of language that carries an objective or practical meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no consen ...
, rather than a bit; this is usually due to the ways computers transfer blocks of information. Most programming languages, even those with no explicit Boolean type, have support for Boolean algebraic operations such as
conjunction Conjunction may refer to: * Conjunction (grammar), a part of speech * Logical conjunction, a mathematical operator ** Conjunction introduction, a rule of inference of propositional logic * Conjunction (astronomy), in which two astronomical bodies ...
(AND, &, *),
disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor S ...
(OR, , , +), equivalence (EQV, =,

),
exclusive or Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
/non-equivalence (XOR, NEQV, ^, !=, ¬), and
negation In logic, negation, also called the logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P or \overline. It is interpreted intuitively as being true when P is false, and fals ...
(NOT, ~, !, ¬). In some languages, like
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sap ...
,
Smalltalk Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan K ...
, and Alice the ''true'' and ''false'' values belong to separate classes, e.g., True and False, respectively, so there is no one Boolean ''type''. In SQL, which uses a
three-valued logic In logic, a three-valued logic (also trinary logic, trivalent, ternary, or trilean, sometimes abbreviated 3VL) is any of several many-valued logic systems in which there are three truth values indicating ''true'', ''false'' and some indeterminate ...
for explicit comparisons because of its special treatment of
Null Null may refer to: Science, technology, and mathematics Computing * Null (SQL) (or NULL), a special marker and keyword in SQL indicating that something has no value *Null character, the zero-valued ASCII character, also designated by , often used ...
s, the Boolean data type (introduced in SQL:1999) is also defined to include more than two truth values, so that SQL ''Booleans'' can store all logical values resulting from the evaluation of predicates in SQL. A column of Boolean type can be restricted to just TRUE and FALSE though.


ALGOL and the built-in boolean type

One of the earliest programming languages to provide an explicit ''boolean'' data type is
ALGOL 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
(1960) with values ''true'' and ''false'' and logical operators denoted by symbols '\wedge' (and), '\vee' (or), '\supset' (implies), '\equiv' (equivalence), and '\neg' (not). Due to input device and
character set Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values that ...
limits on many computers of the time, however, most compilers used alternative representations for many of the operators, such as AND or 'AND'. This approach with ''boolean'' as a built-in (either primitive or otherwise predefined)
data type In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most prog ...
was adopted by many later programming languages, such as
Simula Simula is the name of two simulation programming languages, Simula I and Simula 67, developed in the 1960s at the Norwegian Computing Center in Oslo, by Ole-Johan Dahl and Kristen Nygaard. Syntactically, it is an approximate superset of ALGOL ...
67 (1967),
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously de ...
(1970), Pascal (1970), Ada (1980),
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's most ...
(1995), and C# (2000), among others.


Fortran

The first version of FORTRAN (1957) and its successor FORTRAN II (1958) have no logical values or operations; even the conditional IF statement takes an arithmetic expression and branches to one of three locations according to its sign; see
arithmetic IF The arithmetic IF statement is a three-way arithmetic conditional statement, first seen in the first release of Fortran in 1957, and found in all later versions, and some other programming languages, such as FOCAL. Unlike the logical IF stateme ...
. FORTRAN IV (1962), however, follows the ALGOL 60 example by providing a Boolean data type (LOGICAL), truth literals (.TRUE. and .FALSE.), Boolean-valued numeric comparison operators (.EQ., .GT., etc.), and logical operators (.NOT., .AND., .OR.). In FORMAT statements, a specific format descriptor ('L') is provided for the parsing or formatting of logical values.


Lisp and Scheme

The language
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
(1958) never had a built-in Boolean data type. Instead, conditional constructs like cond assume that the logical value ''false'' is represented by the empty list (), which is defined to be the same as the special atom nil or NIL; whereas any other
s-expression In computer programming, an S-expression (or symbolic expression, abbreviated as sexpr or sexp) is an expression in a like-named notation for nested list (tree-structured) data. S-expressions were invented for and popularized by the programming l ...
is interpreted as ''true''. For convenience, most modern dialects of Lisp predefine the atom t to have value t, so that t can be used as a mnemonic notation for ''true''. This approach (''any value can be used as a Boolean value'') was retained in most Lisp dialects ( Common Lisp, Scheme,
Emacs Lisp Emacs Lisp is a dialect of the Lisp programming language used as a scripting language by Emacs (a text editor family most commonly associated with GNU Emacs and XEmacs). It is used for implementing most of the editing functionality built into Ema ...
), and similar models were adopted by many
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scriptin ...
s, even ones having a distinct Boolean type or Boolean values; although which values are interpreted as ''false'' and which are ''true'' vary from language to language. In Scheme, for example, the ''false'' value is an atom distinct from the empty list, so the latter is interpreted as ''true''. Common Lisp, on the other hand, also provides the dedicated boolean type, derived as a specialization of the symbol.


Pascal, Ada, and Haskell

The language Pascal (1970) introduced the concept of programmer-defined
enumerated type In computer programming, an enumerated type (also called enumeration, enum, or factor in the R programming language, and a categorical variable in statistics) is a data type consisting of a set of named values called ''elements'', ''members'', '' ...
s. A built-in Boolean data type was then provided as a predefined enumerated type with values FALSE and TRUE. By definition, all comparisons, logical operations, and conditional statements applied to and/or yielded Boolean values. Otherwise, the Boolean type had all the facilities which were available for enumerated types in general, such as ordering and use as indices. In contrast, converting between Booleans and integers (or any other types) still required explicit tests or function calls, as in ALGOL 60. This approach (''Boolean is an enumerated type'') was adopted by most later languages which had enumerated types, such as
Modula The Modula programming language is a descendant of the Pascal language. It was developed in Switzerland, at ETH Zurich, in the mid-1970s by Niklaus Wirth, the same person who designed Pascal. The main innovation of Modula over Pascal is a module ...
, Ada, and
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lang ...
.


C, C++, Objective-C, AWK

Initial implementations of the language C (1972) provided no Boolean type, and to this day Boolean values are commonly represented by integers (ints) in C programs. The comparison operators (>,

, etc.) are defined to return a signed integer (int) result, either 0 (for false) or 1 (for true). Logical operators (&&, , , , !, etc.) and condition-testing statements (if, while) assume that zero is false and all other values are true. After enumerated types (enums) were added to the
American National Standards Institute The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organi ...
version of C,
ANSI C ANSI C, ISO C, and Standard C are successive standards for the C programming language published by the American National Standards Institute (ANSI) and ISO/IEC JTC 1/SC 22/WG 14 of the International Organization for Standardization (ISO) and the ...
(1989), many C programmers got used to defining their own Boolean types as such, for readability reasons. However, enumerated types are equivalent to integers according to the language standards; so the effective identity between Booleans and integers is still valid for C programs. Standard C (since
C99 C99 (previously known as C9X) is an informal name for ISO/IEC 9899:1999, a past version of the C programming language standard. It extends the previous version ( C90) with new features for the language and the standard library, and helps impl ...
) provides a boolean type, called _Bool. By including the header stdbool.h, one can use the more intuitive name bool and the constants true and false. The language guarantees that any two true values will compare equal (which was impossible to achieve before the introduction of the type). Boolean values still behave as integers, can be stored in integer variables, and used anywhere integers would be valid, including in indexing, arithmetic, parsing, and formatting. This approach (''Boolean values are just integers'') has been retained in all later versions of C. Note, that this does not mean that any integer value can be stored in a boolean variable.
C++ C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''. History "C" ...
has a separate Boolean data type bool, but with automatic conversions from scalar and pointer values that are very similar to those of C. This approach was adopted also by many later languages, especially by some
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scriptin ...
s such as
AWK AWK (''awk'') is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems. The AWK lan ...
.
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTS ...
also has a separate Boolean data type BOOL, with possible values being YES or NO, equivalents of true and false respectively. Also, in Objective-C compilers that support C99, C's _Bool type can be used, since Objective-C is a
superset In mathematics, set ''A'' is a subset of a set ''B'' if all elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are unequal, then ''A'' is a proper subset o ...
of C.


Java

In
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's most ...
, the value of the boolean data type can only be either true or false.


Perl and Lua

Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offic ...
has no boolean data type. Instead, any value can behave as boolean in boolean context (condition of if or while statement, argument of && or , , , etc.). The number 0, the strings "0" and "", the empty list (), and the special value undef evaluate to false. All else evaluates to true. Lua has a boolean data type, but non-boolean values can also behave as booleans. The non-value nil evaluates to false, whereas every other data type value evaluates to true. This includes the empty string "" and the number 0, which are very often considered false in other languages.


PL/I

PL/I PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language developed and published by IBM. It is designed for scientific, engineering, business and system programming. I ...
has no boolean data type. Instead, comparison operators generate BIT(1) values; '0'B represents false and '1'B represents true. The operands of, e.g., &, , , ¬, are converted to bit strings and the operations are performed on each bit. The ''element-expression'' of an IF statement is true if any bit is 1.


Rexx

Rexx Rexx (Restructured Extended Executor) is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. ...
has no boolean data type. Instead, comparison operators generate 0 or 1; 0 represents false and 1 represents true. The operands of, e.g., &, , , ¬, must be 0 or 1.


Tcl

Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company ** TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited, ...
has no separate Boolean type. Like in C, the integers 0 (false) and 1 (true—in fact any nonzero integer) are used. Examples of coding: The above will show since the expression evaluates to 1. The above will render an error, as variable cannot be evaluated as 0 or 1.


Python, Ruby, and JavaScript

Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pr ...
, from version 2.3 forward, has a bool type which is a subclass of int, the standard integer type. It has two possible values: True and False, which are ''special versions'' of 1 and 0 respectively and behave as such in arithmetic contexts. Also, a numeric value of zero (integer or fractional), the null value (None), the empty string, and empty containers (lists, sets, etc.) are considered Boolean false; all other values are considered Boolean true by default. Classes can define how their instances are treated in a Boolean context through the special method __nonzero__ (Python 2) or __bool__ (Python 3). For containers, __len__ (the special method for determining the length of containers) is used if the explicit Boolean conversion method is not defined. In
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sap ...
, in contrast, only nil (Ruby's null value) and a special false object are ''false''; all else (including the integer 0 and empty arrays) is ''true''. In
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, often ...
, the empty string (""), null, undefined, NaN, +0,
−0 Signed zero is zero with an associated sign. In ordinary arithmetic, the number 0 does not have a sign, so that −0, +0 and 0 are identical. However, in computing, some number representations allow for the existence of two zeros, often denoted by ...
and false are sometimes called ''falsy'' (of which the
complement A complement is something that completes something else. Complement may refer specifically to: The arts * Complement (music), an interval that, when added to another, spans an octave ** Aggregate complementation, the separation of pitch-class ...
is ''truthy'') to distinguish between strictly type-checked and
coerced Coercion () is compelling a party to act in an involuntary manner by the use of threats, including threats to use force against a party. It involves a set of forceful actions which violate the free will of an individual in order to induce a desi ...
Booleans. As opposed to Python, empty containers (arrays , Maps, Sets) are considered truthy. Languages such as
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
also use this approach.


SQL

Booleans appear in SQL when a condition is needed, such as clause, in form of predicate which is produced by using operators such as comparison operators, operator, etc. However, apart from and , these operators can also yield a third state, called , when comparison with is made. The SQL92 standard introduced and operators which evaluate a predicate, which predated the introduction of boolean type in SQL:1999. The SQL:1999 standard introduced a data type as an optional feature (T031). When restricted by a constraint, a SQL behaves like Booleans in other languages, which can store only and values. However, if it is nullable, which is the default like all other SQL data types, it can have the special null value also. Although the SQL standard defines three literals for the type – and it also says that the and "may be used interchangeably to mean exactly the same thing". This has caused some controversy because the identification subjects to the equality comparison rules for NULL. More precisely is not but . As of 2012 few major SQL systems implement the T031 feature. Firebird and
PostgreSQL PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the Ingr ...
are notable exceptions, although PostgreSQL implements no literal; can be used instead. The treatment of boolean values differs between SQL systems. For example, in
Microsoft SQL Server Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which ...
, boolean value is not supported at all, neither as a standalone data type nor representable as an integer. It shows the error message "An expression of non-boolean type specified in a context where a condition is expected" if a column is directly used in the clause, e.g. , while a statement such as yields a syntax error. The data type, which can only store integers 0 and 1 apart from , is commonly used as a workaround to store Boolean values, but workarounds need to be used such as to convert between the integer and boolean expression.
Microsoft Access Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Access Database Engine (ACE) with a graphical user interface and software-development tools (not to be confused with the old Microsoft Access w ...
, which uses the
Access Database Engine The Access Database Engine (also Office Access Connectivity Engine or ACE and formerly Microsoft Jet Database Engine, ''Microsoft JET Engine'' or simply ''Jet'') is a database engine on which several Microsoft products have been built. The fir ...
(ACE/JET), also does not have a boolean data type. Similar to MS SQL Server, it uses a data type. In Access it is known as a Yes/No data type which can have two values; Yes (True) or No (False). The BIT data type in Access can also can be represented numerically; True is −1 and False is 0. This differs to MS SQL Server in two ways, even though both are Microsoft products: # Access represents as −1, while it is 1 in SQL Server # Access does not support the Null tri-state, supported by SQL Server
PostgreSQL PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the Ingr ...
has a distinct type as in the standard, which allows predicates to be stored directly into a column, and allows using a column directly as a predicate in a clause. In
MySQL MySQL () is an open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A relational database or ...
, is treated as an alias of ; is the same as integer 1 and is the same is integer 0. Any non-zero integer is true in conditions.


Tableau

Tableau Software Tableau Software ( ) is an American interactive data visualization software company focused on business intelligence. It was founded in 2003 in Mountain View, California, and is currently headquartered in Seattle, Washington. In 2019 the compa ...
has a BOOLEAN data type. The literal of a boolean value is True or False. The Tableau INT() function converts a boolean to a number, returning 1 for True and 0 for False.


Forth

Forth (programming language) Forth is a procedural, stack-oriented programming language and interactive environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was ofte ...
has no boolean type, it uses regular integers: value 0 (all bits low) represents false, and -1 (all bits high) represents true. This allows the language to define only one set of logical operators, instead of one for mathematical calculations and one for conditions.


See also

*
True and false (commands) In Unix-like operating systems, true and false are commands whose only function is to always return with a predetermined exit status. Programmers and scripts often use the exit status of a command to assess success (exit status zero) or failure ( ...
for
shell scripting A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
* Shannon's expansion *
Boolean differential calculus Boolean differential calculus (BDC) (German: (BDK)) is a subject field of Boolean algebra discussing changes of Boolean variables and Boolean functions. Boolean differential calculus concepts are analogous to those of classical differential ca ...
*
Three-valued logic In logic, a three-valued logic (also trinary logic, trivalent, ternary, or trilean, sometimes abbreviated 3VL) is any of several many-valued logic systems in which there are three truth values indicating ''true'', ''false'' and some indeterminate ...


References

{{DEFAULTSORT:Boolean Data Type Boolean algebra Data types Primitive types Articles with example ALGOL 68 code