LYCOS RETRIEVER Beta Retriever Home  |  What is Lycos Retriever?   
Limbo (Language): Modules
built 640 days ago
Limbo (Language) also shows up in the Retriever categories:
Limbo (Movie) , and more.
Applications in Inferno are usually started by the Inferno shell, which is itself an application written in Limbo. The responsibility of the shell is to launch other applications. To do so, it must know what function in the modules to invoke. By convention, for the shell to be able to launch an application, that application must have a function init, with the signature:
Source:
Graphics are not built into the Limbo language. Graphics in Limbo are handled through the Inferno Reference API. Inferno graphics functions are packaged in three distinct interface modules, the Draw module, the Prefab module, and the Limbo/Tk modules.
# A simple program to sum up some numbers # presented on the command line, from # Bob Pike's forthcoming book on Limbo. implement Sum; include "sys.m"; sys: Sys; include "draw.m"; Sum: module { init: fn(context: ref Draw->Context, argl: list of string); }; init(context: ref Draw->Context, argl: list of string) { sys = load Sys Sys->PATH; argl = tl argl; # ignore command name if(len argl == 0){ sys->print("usage: sum numbers....\n"); return; } sum := 0.0; while(argl != nil){ arg := hd argl; sys->print("%s", arg); sum += real arg; argl = tl argl; if(argl != nil) sys->print(" + "); } sys->print(" = %g\n", sum); }
SEARCH
MORE ABOUT