Help Contents / Procedure Definition / copyDef

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 


previous: be	next: define
