Next: , Previous: , Up: Methods   [Index]


Required classes

Required Classes

The keyword require tells ctalk to preload the class given as its argument before any other classes or methods.

The following lines appear in the ctalklib library.

require Object;
require Symbol;
require String;

These statements tell ctalk to first load the Object class and its methods, and then load the class Symbol and its methods, and then class String. Ctalk loads the class and its methods at that point in the program, before further processing of the source file.

The require keyword always occurs in a global scope; that is, outside of any method or function.