DEFINE Command
Date: 2020-10-07 18:10:00

Up | Prev | PrevTail | Tail

### 6.6 DEFINE Command

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

⟨identiﬁer⟩ | = | ⟨number⟩∣⟨identiﬁer⟩∣⟨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 identiﬁer. It stays in eﬀect until the end of the REDUCE run.

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

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

Up | Prev | PrevTail | Front