Functions
f := function(x_1, ..., x_n: parameters) : ->
f := func< x_1, ..., x_n: parameters | expression >;
Example Func_Recursion (H2E1)
Example Func_Parameters (H2E2)
Example Func_Underscore (H2E3)
Procedures
p := procedure(x_1, ..., x_n: parameters) statements : ->
p := proc< x_1, ..., x_n: parameters | expression >;
Example Func_Procedures (H2E4)
The forward Declaration
forward f; : identifier ->
Example Func_forward (H2E5)
Intrinsics
Example Func_intrinsic (H2E6)
Attaching and Detaching Package Files
Attach(F); : file ->
Detach(F); : file ->
freeze;
Importing Constants
import "filename": ident_list;
Example Func_import (H2E7)
Argument Checking
require condition: print_args;
requirerange v, L, U;
requirege v, L;
Example Func_require (H2E8)
Package Specification files
AttachSpec(S) : file ->
DetachSpec(S) : file ->
Example Func_spec (H2E9)
User Startup Specification Files
Example Func_startup-spec (H2E10)
User-defined Attributes
AddAttribute(C, F) : Cat, MonStgElt -> ;
declare attributes C: F_1, ..., F_n;
Accessing Attributes
S`fieldname : Str, Fieldname -> Elt
assigned S`fieldname : Str, Fieldname -> BoolElt
S`fieldname := expression;
delete S`fieldname;
GetAttributes(C) : Cat -> [ MonStgElt ]
ListAttributes(C) : Cat ->
User-defined Verbose Flags
declare verbose F, m;
Examples
Example Func_SystemAttributes (H2E11)
Example Func_InteractiveUserAttributes (H2E12)
Example Func_PackageUserAttributes (H2E13)