H (Hybrid) Language
∟"array" Data Type
∟What Is "array" Data Type
This section describes what is 'array' data type.
"array" data type defines how array data objects should be constructed
and what operations are provided for them.
"array" data type should support the following features:
- Literals for "array" data type are written in the format of
[o1, o2, o3, ...], where o1, o2, o3, are any data objects.
- "array" constructor function: array().
- The array.get() function returns the element from
an array at a given location.
- The array.set() function updates an array
at a given location with a given object.
- "array" "add" operation function: array.add().
- "array" "add" operator "+", alias of array.add().
- The array.length() function returns the number of elements in
a given array.
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