H (Hybrid) Language - v0.03, by Dr. Herong Yang
Group Statement
This section describes what is a group statement in H language.
A group statement is a statement that has multiple sub-statements grouped together to be used as a single statement. A group statement has the following syntax:
( statement; ...; );
If you want to put multiple statements as a single sub-statement in a conditional $if, $elseif or $else statement, you need to use a group statement with the following syntax:
$if condition, ( statement; ...; ); $elseif condition, ( statement; ...; ); ... $else, ( statement; ...; );
Here are example of group statements:
$if price > 1000.00, ( write("Too expensive for me!"); ... ); $elseif price < 100.00, ( write("I want to buy it!"); ... ); $else, ( write("I will think about it!"); ... );
Design options:
1. Use round brackets to specify a group statement:
$if condition, ( statement; ...; );
2. Use curly brackets to specify a group statement.
$if condition, { statement; ...; };
Table of Contents
Conditional "elseif" Statement
"switch" Statement - Not Supported
"do...while" Statement - Not Supported
Inheritance - Object Attachments