Comments // this is a comment Comments can be preceded by code on the same line. Blocks { ... } The opening and closing braces must each be on their own line. Assignment set variable value Drawing paper t Clears the page with tone t, where t is a percentage of black from 0 to 100. pen t Sets the drawing tone to t, where t is a percentage of black from 0 to 100. line x0 y0 x1 y1 Draws a line with the current drawing tone. [ x y ] An arithmetic expression equal to the current tone of the pixel at (x,y). Note that x and y are from 0 to 100. set [ x y ] t Sets the pixel at (x,y) to tone t, where t is a percentage of black from 0 to 100. Loops repeat variable start_value end_value { ... } The end_value can be larger or smaller than the start_value. forever { ... } Forever loops are implicitly double buffered. A program can break out of a forever loop with the "escape" keyword. Arithmetic Operators + - * / Multiplication and division take precedence. Arithmetic expressions formed with these operators must (usually) be enclosed in parentheses ( ). Special Numbers n is 1 for x, 2 for y, 3 for button state (0 is not pressed, 100 is pressed) n is 1 to 26 for keyboard keys a-z. State is 0 for not pressed, 100 for pressed.