Go Booleans: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:


Booleans are designated by [[Go Concepts - Lexical Structure#Pre-Declared_Identifiers|pre-declared type identifier]] <tt>bool</tt>.
Booleans are designated by [[Go Concepts - Lexical Structure#Pre-Declared_Identifiers|pre-declared type identifier]] <tt>bool</tt>.
The values of the type take 1 byte (8 bits) of memory each.


=Boolean Literals=
=Boolean Literals=


The boolean literals are [[Go Concepts - Lexical Structure#Pre-Declared_Identifiers|pre-declared constants]] <tt>true</tt> and <tt>false</tt>.
The boolean literals are [[Go Concepts - Lexical Structure#Pre-Declared_Identifiers|pre-declared constants]] <tt>true</tt> and <tt>false</tt>.
=Boolean Operators and Functions=
* and <tt>&&</tt>
* or <tt>||</tt>
* not <tt>!</tt>

Latest revision as of 18:29, 12 April 2016

Internal

Overview

Booleans are designated by pre-declared type identifier bool.

The values of the type take 1 byte (8 bits) of memory each.

Boolean Literals

The boolean literals are pre-declared constants true and false.

Boolean Operators and Functions

  • and &&
  • or ||
  • not !