18 Nov
2008
18 Nov
'08
8:47 a.m.
Aditya Mahajan wrote:
Notice the first line of \ascii, and compare that with the definition of \doifelse. The command \!!stringa inside the definition of \doifelse gets expanded too soon. Is there any way to get this work, other than doing the comparison outside the MP code.
Not with \doifelse. If the control sequences are as simple as in the example, you could do the comparison in MP code: def doifelse (expr a, b)(text c)(text d) = if a=b: c else: d fi enddef; draw doifelse("test")("string")(fullcircle)(fullsquare) scaled 5cm ; Best wishes, Taco