FANDOM


Syntax

COPYDEF name name

Explanation

COPYDEF copies the definition of its second input to its first input. The second input to COPYDEF must be a name of either a procedure or a primitive.

If you use COPYDEF to redefine a primitive with a new meaning, you will lose the old primitive. For example: COPYDEF "BK "FD redefines BK to move the turtle forward. You must restart Logo to regain the original definition of BK.

Examples

? TO MYNAME

> PRINT [ORLANDO]

> END

MYNAME defined.

? COPYDEF "YRNAME "MYNAME

? PO MYNAME YRNAME

TO MYNAME

PRINT [ORLANDO]

END

TO YRNAME

PRINT [ORLANDO]

END

? MYNAME

ORLANDO

? YRNAME

ORLANDO

?

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.