Index: doc/tutorial.html =================================================================== diff -u -rf3794b8253a6b514a299f0587f524fdd984727d6 -rc772217e6f1895d5491ec684a7f31515dac68b36 --- doc/tutorial.html (.../tutorial.html) (revision f3794b8253a6b514a299f0587f524fdd984727d6) +++ doc/tutorial.html (.../tutorial.html) (revision c772217e6f1895d5491ec684a7f31515dac68b36) @@ -283,7 +283,7 @@ To give you an impression of the language before we go into the details of the extended language constructs, we present in this section a simple, classical example, familiar to many from introductory programming courses: the Stack example. In the later section, we will present the soccer club example, which focuses more on the dynamic features of the Extended Object Tcl.
-In a first step, we define a class Stack. A new class is defined in XOTcl via the command Class create yourclass. The stack will have a constructor (in XOTcl, the method init) and the methods push and pop. Methods which are inherited to objects are defined via instproc. In the following example, all prededined commands (some from Tcl, some from XOTcl) are emphasiszed. +
In a first step, we define a class Stack. A new class is defined in XOTcl via the command Class create yourclass. The stack will have a constructor (in XOTcl, the method init) and the methods push and pop. Methods which are inherited to objects are defined via instproc. In the following example, all predefined commands (some from Tcl, some from XOTcl) are emphasized.
@@ -313,7 +313,7 @@
-The defintion of the class Stack is typically saved in a file (say stack.xotcl) +The definition of the class Stack is typically saved in a file (say stack.xotcl) and can be used e.g. in an interactive Tcl shell (tclsh) as follows. The percent sign indicates the prompt of the Tcl shell, the reminder of the line is typed in, the result of the command is shown in the line below. Comments are lines starting with a hash symbol #. @@ -376,8 +376,8 @@
So far, the definition of stacks were pretty minimal. Suppose, we want to define safe stacks, that check e.g. for stack underruns (more pop the push operations are issued). Checking safety can be done mostly independent from the implementation details of the stack (usage of interal data structures). -With XOTcl, one can define stack-safety as a seaprate class using methods with the same names as the implementations before, and "mix" this behavior later into classes or objects. The implementation of Safety uses a counter to check for stack underruns.
+So far, the definition of stacks were pretty minimal. Suppose, we want to define safe stacks, that check e.g. for stack underruns (more pop the push operations are issued). Checking safety can be done mostly independent from the implementation details of the stack (usage of internal data structures). +With XOTcl, one can define stack-safety as a separate class using methods with the same names as the implementations before, and "mix" this behavior later into classes or objects. The implementation of Safety uses a counter to check for stack underruns.
-Note that the definition of Saftey can be used not only for instances of the class Stack, but for arbitrary objects supporting the same interface. Therefore we could as well make the stack object stack (that we created before) safe at any time by adding the safety at arbitray times with the method mixin, and we can remove the saftey as well at any time. +Note that the definition of Saftey can be used not only for instances of the class Stack, but for arbitrary objects supporting the same interface. Therefore we could as well make the stack object stack (that we created before) safe at any time by adding the safety at arbitrary times with the method mixin, and we can remove the safety as well at any time.# @@ -416,7 +416,7 @@ Stack empty!
# Add Safety to the object stack