![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
18 Nov
2008
18 Nov
'08
1: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