instance
 
 
 

Syntax:

instance <object reference> ();

or

inst <object reference> ();

Purpose:

The instance statement creates an instance of an object. The <object reference> may be either a variable reference or an array element reference. In either case, an object is created from the data item. The data item being referenced must be of an appropriate type (that is, Light Data Type, Patch Data Type, Face Data Type, or Camera Data Type). If the <object reference> is a variable ref-erence, then the type check is performed at parse time, otherwise it is performed at instancing time. If an improper data type is given, a warning message is issued and execution continues with the instance ignored. The effect of an instance is the same as if a literal of the same type and having the compo-nent values of the <object refer-ence> were used instead.

The end of an instance statement is marked by a semi-colon.

Note that inst and instance keywords can be used interchangeably.

Example:

instance sphere_patch();