< Previous | Contents | Manuals Home | Boris FX | Next >
Defining Adjectives
You can also define your own adjectives. This is a bit more complex than the rule definitions we've shown so far. Suppose we want to define an adjective that means that a tracker's error is over 2.5 (hpix):
define "cruddy trackers" means "the trackers where the error is over 2.5".
With this definition, cruddy trackers will work fine, but cruddy far trackers will not: there's no way to combine cruddy in with other adjectives. We've defined a useful phrase, but not an adjective.
To define cruddy as an adjective, we can
define a "cruddy" tracker means the tracker's error is over 2.5.
Notice how the quotes are positioned differently, to indicate that it is the word cruddy that is being defined. The adjective is defined in terms of whether a specific condition is true or not (here, the tracker's error is over 2.5). The general form is
define `a` a quotedphrase a metaobjectname means a condition.
An adjective can also be defined in terms of the kind of adjective phrase that normally appears after a metaobject's name:
define a "crummy" tracker means a tracker where the error is over 2.5.
The general form of this definition is
define `a` a quotedphrase a metaobjectname means `a` a metaobjectname a cadjphrase.
though consulting the example above is probably more useful.
Exercise: short-lived trackers aren't as reliable; create an adjective to find them.
©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.