Difference between revisions of "SET CLASSLIBRARY"
Yvonnemilne (Talk | contribs) |
Barrymavin (Talk | contribs) (→Example) |
||
Line 27: | Line 27: | ||
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
// myclasslib.cls | // myclasslib.cls | ||
class myclass | class myclass | ||
Line 40: | Line 40: | ||
set classlibrary to myclasslib | set classlibrary to myclasslib | ||
myobject = new myclass() | myobject = new myclass() | ||
− | myobject2 = new myotherclass()</ | + | myobject2 = new myotherclass()</code> |
− | + | ||
==Products== | ==Products== |
Revision as of 05:50, 12 March 2009
Contents
SET CLASSLIBRARY
Class
Environment
Purpose
Open one or more class library files
Syntax
SET CLASSLIBRARY TO [<.cls filename> | (<expC>) [ADDITIVE]]
See Also
Description
The SET CLASSLIBRARY TO <.cls filename> command opens the specified class library file, scans the contents of it, and records the names and positions of the classes defined within it. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. You can place as many classes as required in a class library file. The settings of SET COMPILE and SET DEVELOPMENT (and Operating System permissions and disk space) will determine whether class library files are automatically compiled when the SET CLASSLIBRARY TO command is issued. Compiled class libraries have a ’.clo’ file extension.
If the optional ADDITIVE keyword is specified then any class libraries that are already open are left open and the new class library is added. Without the ADDITIVE keyword, existing class libraries will be closed when a new library is opened with the SET CLASSLIBRARY command. You can open up to 20 class library files at any one time. The SET CLASSLIBRARY TO command, without any <.cls filename> specified, closes all active class library files. A closed library file discards any knowledge of where the classes within reside. Classes are declared by the CLASS keyword followed by the class name. The ENDCLASS statement denotes the end of a class definition. No syntax checking is carried out while the class library file is being scanned. The syntax checking is only carried out when the class is instantiated. The active classes can be listed with the LIST | DISPLAY CLASSES command.
Example
// myclasslib.cls class myclass … endclass class myotherclass … endclass // End of myclasslib.cls set classlibrary to myclasslib myobject = new myclass() myobject2 = new myotherclass()
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer