Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!fernwood!uupsi!sunic!chalmers.se!cs.chalmers.se!jeffrey From: jeffrey@cs.chalmers.se (Alan Jeffrey) Newsgroups: comp.text.tex Subject: Re: (Another) puzzler for wannabe wizards Keywords: Dirty Tricks, catcode changing, puzzle Message-ID: <4652@undis.cs.chalmers.se> Date: 6 Jun 91 12:34:48 GMT References: <4651@undis.cs.chalmers.se> Distribution: comp Organization: Dept. of CS, Chalmers, Sweden Lines: 14 Bernd pointed out that my solution to his puzzler broke down if " had a catcode of \active... this was due to me misreading the question, naughtly me... Anyway, the `correcter' solution is: \expandafter\Swap\expandafter{\the\catcode`\"} {\catcode`\"=\active\Swap} {\def"#1#2{\catcode`\"#1\def"{#2}}\catcode`\"=12 "}" Have a nice day y'all... Alan. -- Alan Jeffrey Tel: +46 31 72 10 98 jeffrey@cs.chalmers.se Department of Computer Sciences, Chalmers University, Gothenburg, Sweden