What Is an Statement

This section describes what is a statement in H language.

A statement is a unit of source code that can be and should be executed by the system as a whole.

Examples of statements are:

1. The statement below is an expression statement, which creates an integer data object represents integer 1:

1;

2. The statement below is an assignment statement, which assigns a reference of the data object created from the expression to variable x:

x = 1;

3. The statement below is a conditional statement, which executes a sub-statement only when the given condition is true:

$if price > 100.00, write("Too expensive for me!");

4. The statement below is a function definition statement, which defines a new function:

$function hello(): {
   write("Hello world!");
};

Last update: 2017.

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

 Data Types

 Variables

 Expressions

Statements

What Is an Statement

 Expression Statement

 Assignment Statement

 Conditional "if" Statement

 Conditional "elseif" Statement

 Conditional "else" Statement

 Group Statement

 "while" Loop Statement

 "for" Loop Statement

 Loop "break" Statement

 Loop "next" Statement

 "switch" Statement - Not Supported

 "do...while" Statement - Not Supported

 "boolean" Data Type

 "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

 PDF Printing Version