next up previous index
Next: Setting and Querying Up: Options Previous: Option Name

Option Value

As the value of any option cannot be a variable, we use the same predicate for setting the option value and for querying it: when the value argument is a variable, it will be bound to the current value of the option. When it is a nonvariable, it will be used to set the new option value. This is not necessarily very pure, however it is quite convenient. The option value is usually a string, an atom, a number or a list. In this case, the option value is a constant which is set statically.

Boolean values can be specified in different ways, e.g. on, 1, true, yes.

For options, whose value is a list, it is possible to specify that the value should be appended to the current value rather than to replace it. This is achieved by prefixing the value with +. For instance,

:- grace_option(control, value_selections, +[[middle_out/3, "Middle Out"]]).
will add a new item at the end of the VALUE... menu.



Micha Meier
Tue Jul 2 10:07:34 MET DST 1996