H (Hybrid) Language - v0.03, by Dr. Herong Yang
Load Program Package in Functions
This section describes how to load an H program package file in a function.
You can load an H program package locally into a function definition body. The loaded package scope is then limited to function body.
Example of loading an H program package in a function:
$function showCircleArea(r): { $load c $from "circle.h"; write(c.area(r)); }; showCircleArea(2.0); # print the area of a circle write(c.pi); # NullPointer error.
Table of Contents
Load Program Package Multiple Times
►Load Program Package in Functions
Inheritance - Object Attachments