What Is an Expression

This section describes what is an expression in H language.

An expression is a sequence of operations on one or more data objects and returns a data object.

Examples of expressions are:

1. The expression below has one data object created with an integer literal. It has no operations and just returns the data object created by the expression.

1;

2. The expression below has two data objects created with two integer literals. It has one operation that creates a third data object represents the sum of the two integer data objects. This expression returns the data object of integer 3 created from the operation.

1 + 2;

3. The expression below has two data objects created with two integer literals. It has one operation that creates a third data object represents the comparison Boolean result of the two integer data objects. This expression returns the data object of Boolean false created from the operation.

1 > 2;

4. The expression below on the second line has one data object referred by the variable x. It has no operations and just returns the data object referred by the variable x.

x = 1; 
x; 

5. The expression below has one data object returned from a function call. It has no operations and just returns the data object received from the function call.

date();

Last update: 2017.

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

 Data Types

 Variables

Expressions

What Is an Expression

 Operations Are Aliases of Function Calls

 Evaluation Order of Multiple Operators

 Sub-Expressions

 Statements

 "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