Boolean and EBoolean types

The EGL Boolean type is a value type that lets you create a logical value. In Eclipse IDE for EGL Developers, the type definition for Boolean is EBoolean.

EGL package name

eglx.lang

Example use
Type detail
In the following detail, the Operation annotation indicates that the specified operation is available. For example, use “==” to compare two values, not “$EQ”.
/*
 * This is the class for bigints, 64-bit signed binary numbers.
 */
externalType EBigint extends ENumber type ClassType

/**
	 * {@Operation ==} Compares two booleans.
*/
static function $EQ(lvalue EBoolean in, rvalue EBoolean in) 
       returns(EBoolean) {@Operation{"=="}};

/**
	 * {@Operation !=} Compares two booleans.
*/
static function $NEQ(lvalue EBoolean in, rvalue EBoolean in) 
       returns(EBoolean) {@Operation{"!="}};

/**
	 * {@Operation &&} Returns true if both operands are true.
*/
	static function $AND(lvalue EBoolean in, rvalue EBoolean in) 
        returns(EBoolean) {@Operation{"&&"}};

/**
	 * {@Operation ||} Returns true if either operand is true.
*/
static function $OR(lvalue EBoolean in, rvalue EBoolean in) 
       returns(EBoolean) {@Operation{"||"}};

/**
	 * {@Operation !} Negates a boolean.
*/
static function $NOT(value EBoolean in) 
       returns (EBoolean) {@Operation{"!"}};

end
Comments
  • The true value can be assigned as true, yes, or a nonzero number.
  • The false value can be assigned as false, no, or a zero.
The value is used in conditional statements such as if, while, and case.
Compatibility
Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.