Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site ittvax.ATC.ITT.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!ittvax!long From: long@ittvax.ATC.ITT.UUCP (H. Morrow Long [CRT]) Newsgroups: net.lang Subject: Re: Cute little liar program (for hackers only) Message-ID: <605@ittvax.ATC.ITT.UUCP> Date: Mon, 16-Jun-86 16:53:25 EDT Article-I.D.: ittvax.605 Posted: Mon Jun 16 16:53:25 1986 Date-Received: Tue, 17-Jun-86 23:46:44 EDT References: <7772@watdaisy.UUCP> Distribution: net Organization: ITT-ATC, Shelton Ct. Lines: 57 > > mpdevine%watdaisy%waterloo.csnet@csnet-relay.arpa CS Dept., U. Waterloo > A further challenge: write a similar program for C and Pascal. > I did something similar in my International Obfuscated C Code Contest entry for 1986. It can be compiled by both the pascal and C compiler on our 4.2bsd Vax. H. Morrow Long ---cut here------- (*FOO); /********************************************************** * * * 1986 Obfuscated C program entry - H. Morrow Long * * * * This program can be compiled by both the 4.2 BSD C and * * pascal (pc) compilers. 'pc' will complain a bit but * * will generate an executable. * * * * To run: * * Copy this file to both foo.c and foo.p * * cc -o c_foo foo.c * * pc -o p_foo foo.p * * * **********************************************************/ #define program void #define Main(a,b) main() #define procedure void #define begin { #define end } #define writeln puts #define foobar (FOO\ *) program Main(input,output) begin writeln("Hello World"); end -- H. Morrow Long Member Research Staff - Knowledge Based Systems ITT-ATC Advanced Technology Group 1 Research Drive Shelton, CT 06484 Phone #: (203)-929-7341 x. 634 path = {allegra bunker dcdvaxb dcdwest ucbvax!decvax milford mit-eddie psuvax1 qumix sii supai tmmnet yale}!ittatc!long