rename the free variable.
void sollya_lib_name_free_variable(const char *)
rename(ident1,ident2) : void
- ident1 is the current name of the free variable.
- ident2 is a fresh name.
- rename permits a change of the name of the free variable. Sollya can handle
only one free variable at a time. The first time in a session that an
unbound name is used in a context where it can be interpreted as a free
variable, the name is used to represent the free variable of Sollya. In the
following, this name can be changed using rename.
- Be careful: if ident2 has been set before, its value will be lost. Use
the command isbound to know if ident2 is already used or not.
- If ident1 is not the current name of the free variable, an error occurs.
- If rename is used at a time when the name of the free variable has not been
defined, ident1 is just ignored and the name of the free variable is set
- It is always possible to use the special keyword _x_ to denote the free
variable. Hence ident1 can be _x_.
Go back to the list of commands
> rename(y, z);
Warning: the current free variable is named "x" and not "y". Can only rename the free variable.
The last command will have no effect.
> rename(_x_, z);
Information: the free variable has been renamed from "x" to "z".
Information: the free variable has been named "y".