ColonScope

Variables

Declaring/changing directly

Declaring/changing a variable uses the following format: v:name:value where "name" is the name of your variable and "value" is the value you want to give that variable. "value" must be a string, number, or another variable.

Declaring/changing with mathematics

Doing maths uses the following format: m:name:expression where "name" is the name of the variable the result will be stored in and "expression" is a mathematical expression. Expressions can only include a single operation. Expressions can only use the + - * / operations. Expressions can include variables as long as they are numbers.

Examples of valid expressions:
5+5
varName*3
300-varName
34.6/20

Examples of invalid expressions:
5+"hello"
2**3
100-50+30
5000

Output

Printing a string uses the following format: p:value where "value" is either a string or a variable containing a string.

Functions/Subroutines

NOTE: Although these are called functions in the code, subroutine is a more accurate description, so it is used here.

Declaring/changing

Declaring/changing a subroutine uses the following format:

  f:name
    [code goes here]
  endf

where "name" is the name of the subroutine. Obviously you should replace "[code goes here]" with the code you want.

Calling

Calling a subroutine uses the following format: f-name where "name" is the name of the subroutine.

Buttons

Printing a button that calls a subroutine uses the following format: b:text:name where "text" is a string that will be displayed as the button text and "name" is the name of the subroutine to be called.