Difference between revisions of "SET CLASSLIBRARY"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 15: Line 15:
  
 
==See Also==
 
==See Also==
CLASS
+
[[CLASS]]
  
  
Line 47: Line 47:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Set_Commands]]
+
[[Category:Set_Commands|CLASSLIBRARY]]

Revision as of 12:08, 11 March 2009

SET CLASSLIBRARY

Class

Environment


Purpose

Open one or more class library files


Syntax

SET CLASSLIBRARY TO [<.cls filename> | (<expC>) [ADDITIVE]]


See Also

CLASS


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