new
Creates a new instance of the specified class and calls the constructor to initialize the instance (inst CONSTRUCT args). If the constructor fails (returns a non-zero result) the instance is detailed, without calling the destructor.
In S_TOOLS-STx versions greater/equal 3.5 the same processing is performed if the command NEW INSTANCE class args /Autoinit is used instead of COBJ NEW class args.
Usage:
COBJ NEW class args
Parameters:
class
The name of the class object to be instatiated.
args
The arguments to be passed to the class constructor.
Result:
The name of the new instance (the instance name) or an empty string on failure.