Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!outbound!gallifrey!root From: root@gallifrey.outbound.wimsey.bc.ca (Steve Lyons) Newsgroups: comp.sys.amiga.programmer Subject: Re: Ok.Somebody Post a 20byte Hello World prg!! Message-ID: Date: 26 Feb 91 10:57:46 GMT References: <91053.081053J56QC@CUNYVM.BITNET> <19298@cbmvax.commodore.com> <18be8cca.ARN1037@prolix.pub.uu.oz.au> Organization: Outbound Technologies Lines: 26 In article <18be8cca.ARN1037@prolix.pub.uu.oz.au>, David Clayton writes: >/*Rot 13 in REXX*/ >Rotated = "nopqrstuvwxyzabcdefghijklm" >Normal = "abcdefghijklmnopqrstuvwxyz" >PARSE ARG Input >Temp = Translate(Input,Rotated,Normal) >Say Translate(Temp,UPPER(Rotated),UPPER(Normal)) > >I used variables that were readable, and it's even got a comment, and is only >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) That does both upper and lower case in one go and is only 138 bytes. :-) 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. Steve Lyons (root@gallifrey.outbound.wimsey.bc.ca)