COPYDEF

Synopsis
COPYDEF newname oldname
Description

Makes a new procedure called newname that is identical to procedure oldname, which may be a primitive. If newname is already defined, its previous definition is lost. If newname is 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. FMSLogo uses MAKE order, not NAME order.

Example
TO WELCOME
  PRINT "Hello
END

WELCOME
Hello
COPYDEF "SAYHELLO "WELCOME
SAYHELLO
Hello

SourceForge.net Logo