Parameters

Parameters are procedures that serve as containers for values; parts of the system that do not operate in the same namespace can still share parameters and thereby read and write shared state.

A parameter takes zero or one arguments. If called with no arguments, it returns the current value of the parameter. If called with one argument, it sets the parameter's value to that of the argument and returns the new value.

The following list of parameters does not yet include the compiler switches, which are also parameters.

Parameter break-handler
Parameter console-input-port-factory
Parameter console-output-port-factory
Parameter current-input-port
Parameter current-output-port
Parameter error-handler
Parameter evaluator
Parameter herald
Parameter interaction-environment
Parameter keyboard-interrupt-handler
Parameter load-evaluator
Parameter quit-handler
Parameter repl-level
Parameter repl-evaluator
Parameter repl-printer
Parameter reset-handler
Parameter standard-timeslice
Parameter structure-comparator
Parameter structure-printer
Parameter timer-interrupt-handler
Procedure make-parameter

(make-parameter name value [predicate]) => procedure

Create a parameter with name name, initial value value, and optional setter predicate predicate. When the parameter is set the new value is first passed to predicate,, and if it returns #F then an error is signalled. Name can be a symbol or a string.

Syntax parameterize

(parameterize ((parameter0 value0) ...) expr0 expr1 ...)

Parameterize overrides the values of a set of parameters in a dynamic scope -- it is like fluid-let for parameters.


$Id: parameters.html,v 1.9 2000/09/22 21:29:05 lth Exp $
larceny@ccs.neu.edu