Data Literals Are Alias of Object Constructions

This section describes H language data literals - alias of object constructions.

Data literals are alias of object constructions from class definitions.

This is to make it easier to create data objects of some commonly used data types. For example,

# data literals, 1, is an alias of integer(1)
one = 1; 
one = integer(1); 

# data literals, "Hello!", is an alias of string("Hello!"); 
hello = "Hello!"; 
hello = string("Hello!");

# data literals, ["Apple", 3, "Orange", 5], is an alias 
# of array("Apple", 3, "Orange", 5)
list = ["Apple", 3, "Orange", 5];
list = array("Apple", 3, "Orange", 5);

Last update: 2017.

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

Data Types

 All Data Are Structured Objects

 All Data Are Created from Classes

Data Literals Are Alias of Object Constructions

 Commonly Used Data Types Are Built-in Data Types

 All Data Types Are Extensions of "object"

 Variables

 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