Functions
f := function(x1, ..., xn: parameters) : ->
f := function(x1, ..., xn, ...: parameters) : ->
function f(x1, ..., xn: parameters) : ->
function f(x1, ..., xn, ...: parameters) : ->
Example Func_Recursion (H2E1)
Example Func_Parameters (H2E2)
Example Func_Underscore (H2E3)
Example Func_Variadic (H2E4)
Procedures
p := procedure(x1, ..., xn: parameters) statements : ->
p := procedure(x1, ..., xn, ...: parameters) statements : ->
p := proc< x1, ..., xn: parameters | expression >;
p := proc< x1, ..., xn, ...: parameters | expression >;
Example Func_Procedures (H2E5)
The forward Declaration
forward f; : identifier ->
Example Func_forward (H2E6)
Intrinsics
Example Func_intrinsic (H2E7)
Resolving Calls to Intrinsics
Example Func_intrinsic-lookup (H2E8)
Attaching and Detaching Package Files
Attach(F) : MonStgElt ->
Detach(F) : MonStgElt ->
freeze;
Importing Constants
import "filename": ident_list;
Example Func_import (H2E9)
Argument Checking
require condition: print_args;
requirerange v, L, U;
requirege v, L;
Example Func_require (H2E10)
Package Specification Files
AttachSpec(S) : MonStgElt ->
DetachSpec(S) : MonStgElt ->
Example Func_spec (H2E11)
User Startup Specification Files
Example Func_startup-spec (H2E12)
User-defined Attributes
AddAttribute(C, F) : Cat, MonStgElt -> ;
declare attributes C: F1, ..., Fn;
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 (H2E13)
Example Func_InteractiveUserAttributes (H2E14)
Example Func_PackageUserAttributes (H2E15)
Declaring User-Defined Types
declare type T;
declare type T: P1, ..., Pn;
declare type T[E];
declare type T[E]: P1, ..., Pn;
Creating an Object
New(T) : Type -> T
Special Intrinsics Provided by the User
Examples
Example Func_MyRat (H2E16)
Example Func_UserTypes2 (H2E17)
[Next][Prev] [Right] [____] [Up] [Index] [Root]
Version: V2.19 of
Mon Dec 17 14:40:36 EST 2012