Macros with Arguments

The "person" macro in the previous example provides a convenience, but has limited utility. The macro's meaning never changes. Often you want a slightly different meaning each time the macro is invoked.

To gain this flexibility define a macro with arguments. argument The following example demonstrates such a macro.

Define the macro "rename" by the command  <"macro rename = 'change name to "' 2 '" in techs ' +"
        "'where id = ' 1 "

With this definition you can use the new `command' "rename"[*]to change names in the "techs" table. For example,  <"rename 5 'John A. Jones' " which Rim will interpret as  <"change name to "John A. Jones" in techs +"
        "where id = 5 "