Syntax:
package "sPackage";
Where,
sPackage - The name of the new function
package
Description:
The package keyword declares a new package name.
All user-defined functions added after the package statement will belong
to the package 'sPackage'. Using what
with a parameter 'sPackage' will show all the functions declared under
the new user defined package.
Example
Code |
#
Declare a new package
package "Sample Package";
# Declare some functions
function void f(int i){
disp(i);
}
function void f(int j, int k){
disp(j + k);
}
function void g(int n){
disp(n*2);
}
# Show the new package is created
what();
# Show a list of functions
# in the new package
what("Sample Package"); |
See Also:
Keywords, what