Dot (.) Expression to Access Object Members

This section describes the concept of using dot (.) expressions to access object property and method members.

Another concept of Object-Oriented programming is that dot (.) expressions are used to access object property and method members.

Examples of access object properties and methods:

$class list:{
   $instance x: {
      length = 0;
	  $method x.sort(): {...}
   }
}

guestList = list();

# access object method
guestList.sort();

# access object property
write(guestList.length);

Last update: 2017.

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

 What Is Object-Oriented Programming

 Objects Are Created from Classes

 Literal Is Special Form of Object Creation

Dot (.) Expression to Access Object Members

 Update Object with Object Methods

 Inheritance - Object Attachments

 Encapsulation - Private Members

 References

 PDF Printing Version