Load Program Package Multiple Times

This section describes how to load the same H program package file multiple times.

You can load the same H program package multiple times as shown in the example below:

$load c $from "circle.h";
$load c $from "circle.h";
$load c1 $from "circle.h";
$load c2 $from "circle.h";
# the circle.h program are executed 4 times. 
# 4 packages are created.
# but only 3 are accessible: c, c1, c2.

write(c.pi);
write(c1.area(2.0));
write(c2.circumference(2.0));

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

 What Is Function

 Create H Program Package File

 Load H Program Package File

Load Program Package Multiple Times

 Load Program Package in Functions

 Load Program Package Remotely

 Expose H Program Package File

 Classes and Objects

 Object Oriented Programming

 Inheritance - Object Attachments

 Encapsulation - Private Members

 References

 PDF Printing Version