as shown in these examples. If an exclamation point appears in a string constant, a new line is printed. X. ! ~ recall number X and print it X. !' ~ recall ASCII code X and print character "Hello" ~ print string "Hello" "Line 1!Line 2" ~ print strings "Line 1" and "Line 2" on two lines Conditionals A conditional statement has the general form: B [ S ] ~ equivalent to: if B then S Here B is an expression that evaluates to 1 (true) or 0 (false), and S is a sequence of statements. Loops Loops may have one of several forms. Most common are the forms: (B ^ S) ~ equivalent to: while B do S (S B ^) ~ equivalent to: repeat S until (not B) Here again B is a boolean value (0 or 1), and S is a sequence of statements. Macro calls The format of a macro (subroutine) call may be illustrated by the following example. Macro A in this example adds the two parameters passed to it from the main program, and returns the sum on the top of the stack. #A,p1,p2; ~ call in main program to macro A ... $A 1% 2% + @ ~ macro A (add parameters p1 and p2) Here p1 and p2 are parameters passed to the macro. Example programs This short program prints 'Hello world.' "Hello world." $ This program displays the squares of the integers from 1 to 10. 1 N: ~ initialize N to 1 ( N. N. * ! " " ~ begin loop; print squares of numbers N. 10 - 0 < ^ ~ exit loop if N >= 10 N. 1 + N: ) $ ~ increment N and repeat loop Notes External links The Mouse Programming Language The Great MOUSE Programming Language Revival Friends of the Mouse Mouse, the Language Mouse: Computer Programming Language (includes source code for Mouse interpreters) Information on sourceforge.net Stack-oriented programming languages