# Directives

LIKE | Inherit Properties

## Format

LIKE "otherclass", "otherclass", ...
Where:

otherclass | Name of a class to inherit properties from.

## Description

The LIKE directive is used in Object Oriented Programming (OOP) to inherit the properties from one or more other classes.

All properties and methods are inherited from the specified classes. When multiple occurrences of the same property/function are found within the inheritance, the first class declared in the LIKE directive takes precedence.

## See Also

DEF CLASS Define Object Class
DROP CLASS Delete Class Definition
DROP OBJECT Delete Object
FUNCTION Declare Object Method
LOAD CLASS Pre-Load Class Definition
LOCAL Designation of Local Data
PROGRAM Create or Assign Program File
PROPERTY Declare Object Properties
RENAME CLASS Change Name of Class
STATIC Add Local Properties at Runtime
NEW( ) Create New Object
REF( ) Control Reference Count

## Example

def class "Company"
function Delete()
remove (fileno,key=COMP_ID$)
return 1
end def
def class "Client"
function Delete()
if AMT_OWING<>0 \
then return 0
remove (fileno,key=CUST_ID$)
return 1
end def
def class "Dealer"
like "Client","Company"
end def

The Dealer class of objects would use the "Client" 'Delete() method since it was declared first.