# PROGRAM Directive

> Source: https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/program-directive

**PROGRAM** *"interface_prog"*

The **PROGRAM** directive is used within a **DEF CLASS .. END DEF** block to define the default program name that is going to service a class of object. Entry points can process methods and read/write properties.

The following optional entry point labels are supported:

|  |  |  |
| --- | --- | --- |
|  | **ON_CREATE** | Called when the object is created |
|  | **ON_DELETE** | Called when the object is deleted |

No error will be reported if the label does not exist. Any references to program logic in a property read/write or a method definition can contain a leading **;** *(semi-colon)*.

***Example:***

The following class definitions are effectively the same:

```
PROGRAM "Cust"
FUNCTION Find(X$) "LookupByName"

or

FUNCTION Find(X$) "Cust;LookupByName"
```

## See Also

**[PROGRAM Directive](https://manual.pvxplus.com/directives/program)**
