[Top] [Prev]


The modules are accessed by including the appropriate interface files into Limbo program code. See The Limbo Programming Language in the Inferno User's Guide for information about the syntax for including modules in an application.

Prior to calling a module's functions, an application must load the module. The application uses the resulting handle as the module qualifier. The examples shown in the following Synopsis illustrate the style. It will usually be necessary to qualify names with the appropriate module pointer or to import the types and functions. The program examples shown in this manual assume the names are accessible in the current scope.

Although many modules are self-contained, dependencies may exist. The system module (Sys), for example, provides basic services that some other modules require.

Sometimes functions are packaged as individual modules but share a single include file. For example, see /include/security.m.

The subsequent chapters contain detailed descriptions of the modules. These descriptions show how to include a module definition during compilation and load an implementation during execution. The program examples also list the functions, abstract data types, and constants. +Although the include files declare these components, the manual pages list them explicitly to facilitate their explanation. In all cases, the enclosing module declaration is assumed so that unqualified identifiers can be used in the text without ambiguity.

The Limbo modules are identical on any machine that is running Inferno, in either a native mode or emulation mode. This enables Limbo programs to be written and tested on any Inferno system.While the current modules should be sufficient for general application development, special situations, such as particular IR hardware, may require the development of additional modules.

Some modules are described in a single page, such as regex. Larger modules are divided into several related pages, such as Limbo Math Module, elem - elementary functions of applied mathematics, fp - floating point operations, and linalg - linear algebra primitives.


include "sys.m";
sys:= load Sys Sys->PATH;

include "draw.m";
draw:= load Draw Draw->PATH;
include "tk.m";

tk:= load Tk Tk->PATH;



include "module.m"; mod:= load Module Module ->PATH;

[Top] [Prev]

Copyright © 1996,Lucent Technologies, Inc. All rights reserved.