INFO
	function - functions in LPC
DESCRIPRION
	A locally defined function can have any number of arguments. All basic
	types can be sent in the argument. A return value is sent with the
	'return' statement. All four data types can be used in the return
	statement. The type of the function is optional. If the type is given,
	typechecking is enabled for that function. If strict_types is used,
	typechecking is used for the whole file and you have to declare the
	type of functions.

	Uninitialized arguments are set to 0.

	The type of the argument must not be declared (except for 'static').
	It is illegal to have a function with the same name as a global
	function, or local variable. Functions are reentrant.

	If there is no return statement, the number 0 will be returned.

	function_name(argument1, argument2 ...)
	{
	    local variables;
	    ...
	    statements;
	    ...
	    return value;
	}

	Functions in other objects can be called with:
		'call_other(ob, "fun", arg...)'.

	This an also be written:
		 'ob->fun(arg...)',
	 which is nicer syntax.

	A function can have the type 'static', and it will not be possible to
	call with call_other() from another object.

	A function can have the type 'private', in which case it will not be
	possible to call from inheriting objects.

	A function can have the type 'nomask', in which case it cannot be
	shadowed.

Help topics available:
C_vs_LPC Lesson1 README arrays block
class3 class4 class1 class2 control_structures
for foreach function inheritance keywords
learn_lpc/ lfuns lpc_standardized mappings operators
preprocessor profezzorn_has_the_word switch things_not_to_do types
virtual while

[START|BACK ]




[ NannyMuds main page | FAQ | Contact us ]

You are guest number 128 since November 2019.
This file was last modified: June 2000.