Up | Prev | PrevTail | Tail |

The command DEFINE allows a user to supply a new name for any identifier or replace it by any well-formed expression. Its argument is a list of expressions of the form

⟨identifier⟩ | = | ⟨number⟩∣⟨identifier⟩∣⟨operator⟩∣ |

⟨reserved word⟩∣⟨expression⟩ |

Example:

define be==,x=y+z;

means that BE will be interpreted as an equal sign, and X as the expression y+z from then on. This renaming is done at parse time, and therefore takes precedence over any other replacement declared for the same identifier. It stays in effect until the end of the REDUCE run.

The identifiers ALGEBRAIC and SYMBOLIC have properties which prevent DEFINE from being used on them. To define ALG to be a synonym for ALGEBRAIC, use the more complicated construction

put(’alg,’newnam,’algebraic);

Up | Prev | PrevTail | Front |