H (Hybrid) Language - v0.03, by Dr. Herong Yang
Expose H Program Package File
This section describes how to load an H program package file.
If you are tired of typing the package name when access package variables and functions, you can expose them as native variables and functions with the following syntax:
$expose package_name.variable_name $as new_variable_name; $expose package_name.function_name $as new_function_name; $expose package_name.variable_name; # keep the original name $expose package_name.function_name; # keep the original name $expose package_name; # expose all variables and functions
Example of exposing H package variables and functions:
$load c $from "circle.h"; $expose c; $expose c.area $as a; $expose c.circumference $as cf; write(pi); # same as write(c.pi); write(a(2.0)); write(cf(2.0));
Table of Contents