Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!dual!amd70!decwrl!decvax!mcnc!ncsu!uvacs!rtg From: rtg@uvacs.UUCP Newsgroups: net.jokes Subject: Rotation Decoding Message-ID: <1352@uvacs.UUCP> Date: Sun, 24-Jun-84 22:33:38 EDT Article-I.D.: uvacs.1352 Posted: Sun Jun 24 22:33:38 1984 Date-Received: Thu, 28-Jun-84 04:47:38 EDT Lines: 44 program rot (output); { this is a Pascal Program that explains how to rotate and unrotate } { a joke for those of you who do not have tr on your own UNIX machine. } { the text to be rot/unrot is in file ROT.TXT and the output is to stdout } { cheers ... Rich Gregory 1615 Hardwood Avenue Charlottesville, VA 22901 804-295-0724 home 804-971-5989 work } var file1 : text; chin : char; chout : char; begin assign ( file1 , 'M:ROT.TXT' ); reset (file1 ) ; while NOT eof ( file1 ) do BEGIN read (file1,chin) ; CASE chin of 'a'..'m' : chout := chr ( ord ( chin ) + 13 ); 'A'..'M' : chout := chr ( ord ( chin ) + 13 ); 'n'.. 'z' : chout := chr ( ord ( chin ) - 13 ); 'N'.. 'Z' : chout := chr ( ord ( chin ) - 13 ); otherwise : chout := chin; END; { case } write ( chout ); END; { while } end.