|
|
Syntax ComparisonsTKTSLogo was designed to be similar in style to UCB Logo and MSWLogo. Although the inner workings of the Logo interpreter is different, a Logo program should require little modification. There are a few subtle differences and this page will outline them.
Quoted First ArgumentTKTSLogo introduces a concept of "Quoted First Argument" for a number of primitives. These primitives treat the first argument as if it was explicitly quoted (unless in parentheses). The primitives effected are quote set ed edit goto tag. For example: show quote foo displays: foo and show quote (word "foo "bar) will display: foobar When converting a program, you may need to wrap some arguments in ()'s.
Getter/SetterTKTSLogo does not (and will not) support the UCB Logo 5.1 Getter/Setter syntax. TKTSLogo however supports a new primitive set.
Alternate QuotingQuoting can be done using a mixture of '"' '\' and/or '|' to build a string, eg, '"foo\ bar'. TKTSLogo introduces another, simpler syntax: 'foo bar' When parsed, this is treated the same as: "foo\ bar When converting a program to TKTSLogo, you may need to escape single quotes with '\'.
'Set' PrimitiveThe problem with Make is that it introduces inconsistencies representing a variable as "foo as well as :foo as in (make "foo :foo+1). The Set primitive maintains the differential between procedures and variables while simplifying the learning curve. Examples: set :foo 0 ; preferred format set foo :foo+1 ; alternative set (word "fo "o) :foo+1 ; cf. (make (word "fo "o) :foo+1) Note that: set "foo :foo+1 ; or set 'foo' :foo+1 Modifies the variable "foo and not foo.
UnicodeTKTSLogo stores all it's strings in Unicode. This provides for a much richer set of characters that it can work with and display. Character EscapeA character can be specified using a character escape. The character escape is of format: \&nnnn& Where nnnn is a 1-4 character hexadecimal number. If this escape is formatted incorrectly, it's accepted until the first invalid character.
CanvasTKTSLogo denotes drawing surfaces as canvases. Each canvas is maintained as a true-color bitmap. A canvas can, but need not be, associated with a window. Each canvas can have one or more turtles.
PenPathA special type of pen that draws a wire frame. The wire frame can then be filled or converted to a turtle shape.
ColorsLike MSWLogo, TKTSLogo allows colors to be represented in [Red Green Blue] format as well as the 16 predefined colors found in UCB Logo. TKTSLogo is designed to run on 16-bit or higher graphics cards. It will work on 256-color mode but it is not optimal.
Setting Background ColorWhen changing background color, TKTSLogo supports the UCB style "SetScreenColor" which replaces every instance of the old background color with the new background color (however in the TKTSLogo implementation, a line drawn in the background color is treated as the background). It also supports the MSWLogo style "SetBackground" that implicitly clears the screen to the specified background color.
QuirksTKTSLogo runs UI in a separate higher priority thread to the interpreter. Use of Freeze and Thaw can reduce the amount of thread switching. |
|
"TKTSLogo" is a Trademark of The Hunter Family Publishing.
|