∟"boolean" "xor" Operation

This section describes 'boolean' 'xor' operation

The "boolean" "xor" operation is provided through the boolean.xor() function, which has the following syntax:

boolean.xor(a, b)

Parameters:
   a - First "boolean" data object
   b - Second "boolean" data object
   
Return: 
   Returns a new "boolean" data object representing $true, 
   if both "a" and "b" represent different Boolean values. 
   Otherwise, returns a new "boolean" data object representing 
   $false.

   If we use 1 for $true and 0 for $false, the Boolean value 
   represented by returning data object can be described as:
        a 0 1
      b |----
      0 | 0 1
      1 | 1 0

The "boolean" "xor" operation can be expressed in the "^" operator format:

a ^ b; # alias of the following function call
boolean.xor(a, b);

Design options:

1. Use ^ as the "boolean" "xor" operator.

2. Use ^^ as the "boolean" "xor" operator.

3. Use $xor as the "boolean" "xor" operator.

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

 Data Types

 Variables

 Expressions

 Statements

►"boolean" Data Type

 What Is "boolean" Data Type

 "boolean" Literals

 Constructor Function: boolean()

 "boolean" "and" Operation

 "boolean" "or" Operation

►"boolean" "xor" Operation

 "boolean" "not" Operation

 "integer" Data Type

 "string" Data Type

 "real" Data Type

 "array" Data Type

 Source Code Packages

 Classes and Objects

 Object Oriented Programming

 Inheritance - Object Attachments

 Encapsulation - Private Members

 References

 Full Version in PDF/ePUB