Directives
RENAME CLASS Change Name of Class
 
Format RENAME CLASS old_name$ TO new_name
 
Where:
 
new_name$ New name for the class.
 
old_name$ Previously defined class to be renamed.
 
TO Mandatory keyword, not case-sensitive.
 
Description The RENAME CLASS directive is used in Object Oriented Programming (OOP) to alter the name of a previously defined class. This functionality allows the application designer to alter an existing object class easily, without having to change programs.
 
Example If you had an existing application with a Product class object but needed to add a new field to the object, such as Lot_Number:
RENAME CLASS "Product" TO "Orig_Product" DEF CLASS "Product"
LIKE "Orig_Product" PROPERTY Lot_Number END DEF
All subsequent uses of a Product class object would be identical now to the standard Productclass and also have the property LOT_NUMBER.
 
See Also Object Oriented Programming
DEF CLASS Define Object Class
DROP CLASS Delete Class Definition
DROP OBJECT Delete Object
FUNCTION Declare Object Method
LIKE Inherit Properties
LOAD CLASS Pre-Load Class Definition
LOCAL Designation of Local Data
PROGRAM Create/Assign Program File
PROPERTY Declare Object Properties
STATIC Add Local Properties at Runtime
NEW( ) Function
REF( ) Function