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

Functions

Functions in Limbo serve the same purpose as they do in other structured, procedural languages-they contain the statements that are executed when the program runs.

The general form of a Limbo function is:

	function_name (arguments) : return_type
	{
		statements
	}

The arguments is a comma-separated list of variable names and their associated types that are passed to the function when it is called. A function is not required to have parameters, but it still must have the parentheses.

The return_type specifies the type of data that the function returns. A function may return any type. A function is not required to return data, and the Limbo compiler does not assume a return result.



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

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