Next: Command levels, Previous: Emacs integration commands, Up: Command processor
The Scheme48 command processor maintains a current focus value.
This is typically the value that the last expression evaluated to, or a
list of values if it returned multiple values. If it evaluated to
either zero values or Scheme48's `unspecific' token (see System features), the focus value is unchanged. At the initial startup of
Scheme48, the focus value is set to the arguments passed to Scheme48's
virtual machine after the -a argument on the command-line
(see Running Scheme48). The focus value is accessed through the
##
syntax; the reader substitutes a special quotation (special
so that the compiler will not generate warnings about a regular
quote
expression containing a weird value) for occurrences of
##
. Several commands, such as ,inspect and
,dis, either accept an argument or use the current focus
value. Also, in the inspector, the focus object
is the object that is currently being inspected.
> (cons 1 2) '(1 . 2) > ## '(1 . 2) > (begin (display "Hello, world!") (newline)) Hello, world! > ## '(1 . 2) > (cdr ##) 2 > (define x 5) ; no values returned > (+ ## x) 7 > (values 1 2 3) ; 3 values returned 1 2 3 > ## '(1 2 3)