When the command window appears, the user can create views and issue any Scheme command or procedure. The command window is used to input Scheme commands and display messages. Graphics are not displayed in the command window.
|
|
The command window has several built-in features that aid in entering Scheme commands:
|
|
Prompt
|
The
acis> prompt indicates that the program is ready for typed input.
|
|
Caret
|
The ^ (caret) symbol is a text cursor that indicates the current typing position.
|
|
Caret bounce
|
As each closing parenthesis ")" of a Scheme command is entered, the caret "bounces" momentarily back to the matching open parentheses "(" to aid in parentheses matching.
|
|
Copy and paste
|
Use the mouse to highlight a block of text (copy) and drop it at the prompt (paste).
|
|
Interpreter response
|
The Elk Scheme interpreter often responds to a procedure by returning the external representation (name) of an object. For example, when the user defines the block
myblock using the command
solid:block, the interpreter responds on the next line with the name of the object,
myblock:
|
|
|
acis> (define myblock (lambda ()
|
|
|
(solid:block (position 0 0 0)
|
|
|
(position 10 10 10))))
|
|
myblock
|
|
acis>
|
|
Parentheses nesting level
|
A Scheme procedure may be entered on one or more lines. The interpreter continues building the procedure until all open parentheses have been matched with close parentheses. As it builds the procedure, a number next to the prompt indicates the number of close parentheses still required (i.e., the nesting level). For example, the definition of block
myblock using command
solid:block could be spread over several input lines:
|
|
|
acis> (define myblock
|
|
acis(1)> (lambda ()
|
|
acis(2)> (solid:block
|
|
acis(3)> (position 0 0 0)
|
|
acis(3)> (position 10 10 10)
|
|
acis(3)> )
|
|
acis(2)> )
|
|
acis(1)> )
|
|
myblock
|
|
acis>
|
|
Object type
|
If the name of some Scheme object is entered without surrounding parentheses, the Scheme Interpreter responds with the external representation (type) of that object. For example:
|
|
|
acis> list
|
|
#[primitive list]
|
|
|
A
list object is a Scheme primitive (native to the Scheme language).
|
|
|
acis> solid:block
|
|
#[primitive solid:block]
|
|
|
A
solid:block is a Scheme primitive (an extension to the Scheme language).
|
|
|
acis> myblock
|
|
#[compound myblock]
|
|
|
A
myblock object is a compound object made up of other Scheme objects and is not a primitive.
|
|
Error messages
|
If a Scheme procedure fails, the Scheme Interpreter returns an error message. For example, if a command is mistyped the interpreter indicates that the command is unbound (i.e., it has no associated value):
|
|
|
acis> (solid:block (position 0 0 0)
|
|
|
(position 10 10 10))
|
|
top-level: unbound variable: solid:block
|
|
The following special keyboard characters and mouse buttons are used:
|
|
<Left Arrow>
|
Backs up to new edit position in input buffer.
|
|
<Right Arrow>
|
Advances to new edit position in input buffer.
|
|
<Up Arrow>
|
Walks back through command history.
|
|
<Down Arrow>
|
Walks forward through command history.
|
|
<PgUp>
|
Scrolls window up.
|
|
<PgDn>
|
Scrolls window down.
|
|
<Escape>
|
Clears the line from the input buffer.
|
|
<Delete>
|
Deletes the character ahead of the cursor from the input buffer.
|
|
<Backspace>
|
Deletes the character behind the cursor from the input buffer.
|
|
<Insert>
|
Toggles insert mode for the input buffer.
|
|
<Home>
|
Goes to the beginning of line in the input buffer.
|
|
<End>
|
Goes to the end of line in the input buffer.
|
|
<Ctrl + A>
|
Goes to the beginning of line in the input buffer.
|
|
<Ctrl + E>
|
Goes to the end of line in the input buffer.
|
|
< \ > + < r >
|
Returns with a window scroll, if necessary.
|
|
< \ > + < n >
|
Provides a new line with a window scroll, if necessary.
|
|
< \ > + < b >
|
Backspaces one character.
|
|
< \ > + < t >
|
Tabs to the next multiple of eight.
|
|
<Left Mouse>
|
Selects text. Hold down, drag to select text, and release. This block of text becomes the primary text selection.
|