[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

Function Definitions

The definitions of functions that are declared in the module interface are in the implementation file. Whether the module interface is in a separeate module interface file or in the implementation file, the function definitions are the same.

For example, the following is the definition of the function declared in the Greet module interface:

	init(ctxt: ref Draw->Context, argv: list of string) {
		sys = load Sys Sys->PATH;

		if ((tl argv) != nil)
			sys->print("Hello, %s!\n", hd (tl argv));
		else
			sys->print("Hello, World!\n");
	}



[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

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