H (Hybrid) Language
∟"array" Data Type
This chapter provides notes on 'array' Data Type in H language.
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
Takeaways:
- "array" data type defines how array data objects should be constructed
and what operations are provided for them.
- "array" literals are written in the syntax of [o1, o2, o3, ...].
- New "array" data object can be created with the "array" constructor function, array().
- The array.get() function is provided to retrieve the element of a given location.
- The array.set() function is provided to update the array element of a given location.
- The "array" element variable expression, x[i], for getting and setting the element at a given location.
- The array.add() function is provided to concatenate two arrays together.
- The "array" "addition" operator "+", is provided as an alias of array.add().
- The array.subArray() function is provided to take a portion of a given array to
create a new 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
Source Code Packages
Classes and Objects
Object Oriented Programming
Inheritance - Object Attachments
Encapsulation - Private Members
References
Full Version in PDF/ePUB