Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!manuel!ccadfa!prolix!dac From: dac@prolix.pub.uu.oz.au (Andrew Clayton) Newsgroups: comp.sys.amiga.programmer Subject: Re: Ok.Somebody Post a 20byte Hello World prg!! Message-ID: <18c14af6.ARN10df@prolix.pub.uu.oz.au> Date: 28 Feb 91 12:53:42 GMT References: <91053.081053J56QC@CUNYVM.BITNET> <19298@cbmvax.commodore.com> <18be8cca.ARN1037@prolix.pub.uu.oz.au> Reply-To: dac@prolix.pub.uu.oz.au Followup-To: comp.sys.amiga.programmer Organization: More like Mis~, really. Lines: 43 In article , Steve Lyons writes: > In article <18be8cca.ARN1037@prolix.pub.uu.oz.au>, David Clayton writes: > > >/*Rot 13 in REXX*/ [poor version deleted] > >201 bytes long. > > > >Well, I thought it was neat. :-/ > > It is, but not as neat as this: > > /* Rot 13 Mark II */ > rot = xrange('n', 'z')xrange('a', 'm') > norm = xrange('a', 'z') > say translate(arg(1), upper(rot)rot, upper(norm)norm) Cute. I didn't read past 'translate' in my manual. :-). For a first time effort, I did alright. I also got it down to one translate operation : /*Rot 13 in REXX*/ Rotated = "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" Normal = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" PARSE ARG Input Say Translate(Input,Rotated,Normal) But it's still 201 bytes. :-), and nowhere near as neat as yours. Mine is more readable though. Ack Thptptpt. :-) :-) > I fear we're about to be caught in a deluge of dimutive ARexx programs and > people telling their authors to stop posting them, but I couldn't resist. Hey, I don't MIND learning more Arexx tricks. > Steve Lyons (root@gallifrey.outbound.wimsey.bc.ca) Dac --