next up previous

11.1 TYPE ATTRIBUTE

The type attribute allows the types of values to be stored in a slot to be restricted.

Syntax

<type-attribute>     ::= (type <type-specification>)
<type-specification> ::= <allowed-type>+ | ?VARIABLE
<allowed-type>
              ::= SYMBOL | STRING | LEXEME |
                  INTEGER | FLOAT | NUMBER |
                  INSTANCE-NAME | INSTANCE-ADDRESS | INSTANCE |
                  EXTERNAL-ADDRESS | FACT-ADDRESS

Using NUMBER for this attribute is equivalent to using both INTEGER and FLOAT. Using LEXEME for this attribute is equivalent to using both SYMBOL and STRING. Using INSTANCE for this attribute is equivalent to using both INSTANCE-NAME and INSTANCE-ADDRESS. ?VARIABLE allows any type to be stored.


next up previous