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