Introduction
Basic Commands

Single commands can be entered in the terminal on the bottom of the app screen. All commands, including control structures, can be run within the code block on the left.

Example of what that looks like:

print 5
>5

You said to 'print 5' so it printed the number 5.

More complex sets of commands can be placed in the code editor. All commands must be contained in a named function, also refered to as a "word"; these are defined as the commands between to <function-name> and end.

All defined functions can be run in the terminal. Programs can also start with the "go" word, which is triggered by a button on the top left of the interface. 'to' and 'end' will not be recognized by the terminal, which is fundamentally different in that it's meant to run single commands.

to hello-world
    print "HelloWorld
end

With the above entered in the code editor, you can enter hello-world in the terminal and it will run, printing "HelloWorld".

You can also define functions to take arguments:

to hello-user :user
  print 'Hello ' + :user
end

Now, if you type hello-user "Maria you'll see "Hello Maria" printed to the terminal. Functions can take any number of arguments. Thanks to dynamic scope, any arguments will automatically be passed to functions called from the parent function:

to print-value :value
    handle-print
end

to handle-print
    print :value
end

Entering print-value 5 will print 5. This applies to strings as well.

Last updated on October 4, 2023