Operator Commands
Operators can issue special commands to the system.
These expressions generally take the form:
#( COMMAND parameters )
Contents
Directory
For live documentation, you can search for commands using APROPOS
#(apropos "apropos")
Issuing an Operator Command
Open the talk box (if it isn't already)
If it's red (no speech) it doesn't matter (for this).
Type “#(” followed by the command name, then a space, any parameter(s) (separated by spaces), and finally “)”
Hit Return/Enter or click the “Speech balloon” button. You should see that it's been transformed into a “(( ))” symbol instead of a speech balloon.
Command names are case-insensitive. APROPOS = Apropos = apropos.
Example command, PRINT, just tells you back whatever you said.
#(print "hello") ⇒ "hello"
Parameters
Typically:
- Strings are quoted with " " around them.
- Numbers are not quoted, and can be whole, like 1234, decimal, like 1.25, or fractions like 5/4. To enter a fraction and a whole, you have to write out the longer form (+ 1 1/4)
- “expressions” are in parentheses, so you can (eg) do some arithmetic like:
#(print (+ 1 1/4)) ⇒ 5/4
#(print (/ (+ 1 2 3) 3)) ⇒ 2
- “true” or “false” are T or NIL.
Optional parameters
Optional parameters can be left off, or provided. Order matters.
Keyword parameters
These occur after any normal (positional) and optional parameters (this means they're no longer optional, you see?)
Format is : and a keyword, then a space, then the value.
#(example-command "positional parameter" :keyword "value for keyword")
Order and capitalization of keyword parameters do not matter. These are all the same:
#(example :foo 1 :bar 2)
#(Example :Foo 1 :BAR 2)
#(example :BAR 2 :foo 1)
Syntax Highlighting
If your parentheses or quotes don't match up, the font coloration should warn you.