copyDef

HC Procedure Definition copyDef
be define

copyDef newname oldname


command. Makes "newname" a procedure identical to "oldname". The latter may be a primitive. If "newname" was already defined, its previous definition is lost. If "newname" was already a primitive, the redefinition is not permitted unless the variable REDEFP has the value TRUE. Definitions created by COPYDEF are not saved by save; primitives are never saved, and user-defined procedures created by COPYDEF are buried. (You are likely to be confused if you pO or poT a procedure defined with COPYDEF because its title line will contain the old name. This is why it's buried.)

Note: dialects of Logo differ as to the order of inputs to COPYDEF. This dialect uses "make order," not "name order."

A recent addition, which was not so easy to implement, is, that you can now make a copyDef of to, be, _Macro, _BEMACRO and END, too. This can be important for translations into other languages.

Example:

copyDef "write "print
write 1234		;1234

copyDef "def "to
copyDef "ende "end
def go :steps
	forward :steps
ende

Examples:

References:

be define