Forms of definitions - Sketch
Description: Sketch

Next: Forms of references, Previous: Definitions, Up: Definitions

#### 3.3.1 Forms of definitions

Definitions have three possible forms, simple, with alternatives, and tag as shown here in order.

Syntax:

         def id object  % simple def
         def id <tag_1> object_1  % def with alternatives
                <tag_2> object_2
                ...
                <> default_object
         def id <>  % tag def

The simple definition merely associates object with the identifier id.

The definition with alternatives associates object_i with id, where tag_i is the first defined tag in the list of alternative tag references. If no tag in the list is defined, then default_object is associated with identifier id.

The final form defines id as a tag. Another way to define a tag is with the -D command line option. See Command line.