What Is Object

This section describes what is object.

An object, also called instance, is a data object of a specific class. An object has the same list of properties and methods as all other objects in the same class.

An object is must be created by a constructor function of the class. For example, the array() constructor function of the "array" class can create "array" objects as show below:

array(1,2,3); # returns an "array" object of [1,2,3]
array(1, "Two", 3); # returns an "array" object of [1, "Two", 3]

Last update: 2017.

Table of Contents

 About This Book

 Introduction of H Language


 Data Types




 "boolean" Data Type

 "integer" Data Type

 "string" Data Type

 "real" Data Type

 "array" Data Type

 Source Code Packages

Classes and Objects

 What Is Class

What Is Object

 $class Statement - Create New Classes

 Class Variables and Functions

 Execution of $class Definition Body

 __new() - Object Constructor Function

 $instance Statement - Define Instance Template

 Execution of $instance Definition Body

 Access Object Properties

 $method Statement - Define Object Method

 Access Object Methods

 _first() Method - Object Initialization

 Access Class Variables from Object Methods

 __delete() - Object Destructor Method

 $delete Statement - Delete Objects

 _last() Method - Object Cleanup

 Object Oriented Programming

 Inheritance - Object Attachments

 Encapsulation - Private Members


 PDF Printing Version