∟Constructor Function: array()

This section describes 'array' constructor function array().

New "array" data object can be created with the "array" constructor function, array(), which has the following syntax:

array(a = [])

Parameters:
   a - An "array" data object. Default is [].

Return: 
   Returns a new "array" data object representing 
   the same array as "a".

Examples of how to use "array" constructor function:

array(); # create a new data object representing an empty array.

x = array(); # assign a new data object representing an empty array to x

# assign a new data object representing an array of two elements to y
y = array([1,2]); 

Table of Contents

 About This Book

 Introduction of H Language

 Syntax

 Data Types

 Variables

 Expressions

 Statements

 "boolean" Data Type

 "integer" Data Type

 "string" Data Type

 "real" Data Type

►"array" Data Type

 What Is "array" Data Type

 "array" Literals

►Constructor Function: array()

 array.get() - Retrieve Element from Array

 x[i] - Array Element Format for array.get()

 array.set() - Update Element of Array

 x[i] - Array Element Format for array.set()

 "array" "add" Operation

 array.subArray() - Sub-Array Function

 Source Code Packages

 Classes and Objects

 Object Oriented Programming

 Inheritance - Object Attachments

 Encapsulation - Private Members

 References

 Full Version in PDF/ePUB