Go to the previous, next section.

PostScript Differences

> is a special character

While '>' is an ordinary character in PostScript, in Ingrid it has a special meaning. When > is the first letter of an executable name, then the word is executed in a special way: The top object of the stack is assumed to be an object, and that object is removed from the stack after the word is executed. This makes it relatively easy to extract information from objects without having the objects clutter up the stack.

PS dictionaries vs. Ingrid objects

A PostScript dictionary is a list of names and their associated values. It is made active by pushing it onto the dictionary stack (using the command `begin'), and make inactive by removing it from the dictionary stack (using the command `end').

An Ingrid object is a list of names and their associated values. It also may have a parent object, an object whose definitions are searched immediately after the child object's. It is active as long as it is on the operand stack, and is rendered inactive by removing it from the stack. This behavior was chosen because Ingrid objects are much more common that PostScript dictionaries, and the second stack was thus an unnecessary complication (The way Ingrid is used would require many `begin's and `end's were it written to match PostScript).

Ingrid objects can also be pushed onto the dictionary stack, i.e. begin and end behave as they do in PostScript. The dictionary stack is scanned for definitions before the data stack, but all new definitions go into the top object on the data stack, not the top object on the dictionary stack.

Go to the previous, next section.