new |
Discworld driver help |
new |
Name
new() - load a copy of an object or allocate a new class
Synopsis
varargs object new( string name, ... );
varargs class new( class name, ... );
Description
If given a string, it behaves like clone_object(). If `name' is a class type, it creates a new instance of the class type. Extra arguments are of the form "member : value", so you can initialise the class.
Example
class dummy {
int frog;
string *womble;
}
class dummy x = new( class dummy, frog : 1, womble : ({ }) );