INFO
	types - the LPC types

DESCRIPTION
	Variables can have one of the following types:
	
	int:	 An integer. Normally full 32 bits signed.
	
	status:	 A boolean, either 0 or 1 (really the same as int).
	
	string:	 A string (not pointer to string).
	
	object:  Pointer to an object.
	
	mapping: A mapping (see also the file mapping)
	
	mixed:   Can have any of the types above and can be casted to a
		 specific type.
	
	All uninitialized variables have the value 0. The type of a variable
	is really only a documentation, and has no effect at all on the
	program (if typechecking isn't enabled)!

	A pointer to a destructed object, will always have the value 0.
	
	You can also have arrays of any of the types. They are declared with a
	'*' before the variable name, for example 'int *numbers;' declares
	'numbers' to be an array of integers. An array must be initialized
	before you can index on it.

	Variables can have one or more of the following type modifiers:
	
	static  This special type behaves different for variables and
	        functions. It is similar to private for functions, in that
	        they can not be called from other objects. Static variables
	        will be neither saved nor restored when calling save_object()
	        or restore_object().

	varargs A function of this type can be called with a variable number
	        of arguments. Otherwise, the number of arguments is checked,
	        and can generate an error.

	private Can be given for both functions and variables. Functions that
	        are private in object A can not be called through call_other
	        from another object. And, they are not accessible to any
	        object that inherits A.

	public  A function defined as public will always be accessible from
	        other objects, even if private inheritance is used.

	nomask  All symbols defined as nomask can not be redefined by
	        inheritance. They can still be used and accessed as usual.

	void    This modifier can only be used for functions. A void function
		cannot return a value.

SEE ALSO
	arrays, mapping

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 163 since November 2019.
This file was last modified: June 2000.