257
PROGRAM Directive
Create or Assign Program File
Format
Where:
interface_prog
Name of default program that contains object logic.
filename$
Name of the program file to create. String expression.
prog_size
Ignored. Size of a program which can be contained in the file.
Numeric expression.
stmtref
Program line number or label to transfer control to.
Description
The PROGRAM directive can be used to create a program file or it can be used in
Object Oriented Programming (OOP) to define a default program name intended to
service an object.
Format 1: Create Program File
PROGRAM filename$[,prog_size][,ERR=stmtref]
This format of the PROGRAM directive to create a ProvideX program file. The file
size is for documentation purposes only and is ignored by the system;e.g.,
0010 PROGRAM "CSTUPD",1024,ERR=1200
Program files have a special header format indicating that the file contains ProvideX
object code. Program files should only be used with the SAVE or LOAD commands.
Any attempt to use READ or WRITE directives with this type of file can yield
unpredictable results when the program file is subsequently loaded.
If a given filename already exists, ProvideX returns an Error #12: File does
not exist (or already exists).
WindX supports the use of this format via the [WDX] tag; e.g., PROGRAM
Format 2: Assign Default Program in Object Oriented Programming
PROGRAM "interface_prog"
In Object Oriented Programming, the PROGRAM directive is used to define the
default program name that is going to service an object. This can be used to override
the program that contains the DEF CLASS.
If this clause is specified for an object class: