CREATE
OBJECT operand1
OF [CLASS ]
operand2 |
|
[GIVING operand4]
|
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Related Statements: DEFINE CLASS | INTERFACE | METHOD | PROPERTY | SEND METHOD
Belongs to Function Group: Component Based Programming
The CREATE OBJECT
statement is used to create an instance
of a class.
Operand Definition Table:
Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operand1 | S | O | no | no | ||||||||||||||||
operand2 | C | S | A | yes | no | |||||||||||||||
operand4 | S | N | I | yes | no |
Syntax Element Description:
operand1 |
Object Handle:
operand1 must be defined as an object
handle ( |
---|---|
OF CLASS operand2 |
Class-Name:
operand2 is the name of the class of
which the object is to be created. For classes that are not registered as DCOM
classes, it must contain the class name defined in the
CREATE OBJECT #O1 OF CLASS "Employee" or CREATE OBJECT #O1 OF CLASS "653BCFE0-84DA-11D0-BEB3-10005A66D231" |
GIVING operand4 |
GIVING Clause:
If this clause is specified, operand4 contains either the Natural message number if an error occurred, or zero on success. If this clause is not specified, Natural run time error processing is triggered if an error occurs. |