Next: , Previous: The *commands* Table, Up: Embedded Commands


6.1.4.5 Command Service
— Function: make-command-server rdb table-name

Returns a procedure of 2 arguments, a (symbol) command and a call-back procedure. When this returned procedure is called, it looks up command in table table-name and calls the call-back procedure with arguments:

command
The command
command-value
The result of evaluating the expression in the procedure field of table-name and calling it with rdb.
parameter-name
A list of the official name of each parameter. Corresponds to the name field of the command's parameter-table.
positions
A list of the positive integer index of each parameter. Corresponds to the index field of the command's parameter-table.
arities
A list of the arities of each parameter. Corresponds to the arity field of the command's parameter-table. For a description of arity see table above.
types
A list of the type name of each parameter. Correspnds to the type-id field of the contents of the domain of the command's parameter-table.
defaulters
A list of the defaulters for each parameter. Corresponds to the defaulters field of the command's parameter-table.
domain-integrity-rules
A list of procedures (one for each parameter) which tests whether a value for a parameter is acceptable for that parameter. The procedure should be called with each datum in the list for nary arity parameters.
aliases
A list of lists of (alias parameter-name). There can be more than one alias per parameter-name.

For information about parameters, See Parameter lists.