STklos Reference Manual
1.1 Overview of STklos
STklos is the successor of STk , a Scheme interpreter which was tightly connected to the Tk graphical toolkit . STk had an object layer which was called STklos. At this time, STk was used to denote the base Scheme interpreter and STklos was used to denote its object layer, which was an extension. For instance, when programming a GUI application, a user could access the widgets at the (low) Tk level, or access them using a neat hierarchy of classes wrapped in STklos.
Since the object layer is now more closely integrated with the language, the new system has been renamed STklos and STk is now used to designate the old system.
Compatibility with STk: STklos has been completely rewritten and as a consequence, due to new implementation choices, old STk programs are not fully compatible with the new system. However, these changes are very minor and adapting a STk program for the STklos system is generally quite easy. The only programs which need heavier work are programs which use Tk without objects, since the new preferred GUI system is now based on GTK+ . Programmers used to GUI programming using STklos classes will find that both system, even if not identical in every points, share the same philosophy.
1.2 Lexical Conventions
In STklos, identifiers which start (or end) with a colon
Note that, by default, STklos is case insensitive as specified by R5RS. This behavior can be changed by
There are four types of comments in STklos:
1.2.3 Here Strings
Here strings permit to easily enter multilines strings in programs. The sequence of characters #<< starts a here string. The characters following this sequence #<< until a newline character define a terminator for the here string. The content of the string includes all characters between the #<< line and a line whose only content is the specified terminator. No escape sequences are recognized between the starting and terminating lines.
Example: the sequence
#<<EOF abc def ghi EOF
is equivalent to the string
1.2.4 Other Notations
STk accepts all the notations defined in R5RS plus
1.3 Basic ConceptsSee the original R5RS document for more informations on the basic concepts of the Scheme Programming Language.