H (Hybrid) Language - v0.03, by Dr. Herong Yang
Constructor Function: integer()
This section describes 'integer' constructor function integer().
New "integer" data object can be created with the "integer" constructor function, integer(), which has the following syntax:
integer(a = 0) Parameters: a - An "integer" data object. Default is 0. Return: Returns a new "integer" data object representing the same value as "a".
Examples of how to use "integer" constructor function:
integer(); # create a new data object representing 0 x = integer(); # assign a new data object representing 0 to x # assign a new data object representing 3 to y y = integer(1 + 2);
Design options:
1. Let the constructor return 0 if no parameter provided.
2. Make the parameter as required for the constructor.
Table of Contents
►Constructor Function: integer()
"integer" "addition" Operation
"integer" "subtraction" Operation
"integer" "multiplication" Operation
"integer" "division" Operation
"integer" "exponentiation" Operation
"integer" "negation" Operation
"integer" "absolute" Operation
"integer" "greater-than" Operation
"integer" "less-than" Operation
"integer" "equal-to" Operation
"integer" "not-equal-to" Operation
"integer" "greater-than-or-equal-to" Operation
"integer" "less-than-or-equal-to" Operation
Inheritance - Object Attachments