Colobot Wiki
Advertisement

Instruction private (for specialists)[]

This is an access modifier for class members. Private members are not accessible outside of the class definition.

Example:

public class MyClass
{
	int    b;                // public by default
	public int a;            // also public
	private point position;  // private
}
void Test()
{
	MyClass item;
	item.a = item.b = 12;      // ok
	message( item.position );  // this is an error
}
Advertisement