https://github.com/jrincayc/ucblogo-code
Raw File
Tip revision: ca23b30a62eaaf03ea203ae71d00dc45a046514e authored by Dan Malec on 21 January 2024, 20:20:12 UTC
Merge pull request #178 from jrincayc/issue_176_alt
Tip revision: ca23b30
macroexpand
MACROEXPAND expr					(library procedure)

	takes as its input a Logo expression that invokes a macro (that is,
	one that begins with the name of a macro) and outputs the the Logo
	expression into which the macro would translate the input expression.


		.macro localmake :name :value
		op `[local ,[word "" :name] apply "make [,[:name] ,[:value]]]
		end

		? show macroexpand [localmake "pi 3.14159]
		[local "pi apply "make [pi 3.14159]]


back to top