Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site mit-trillian.MIT.EDU Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!mit-trillian!wesommer From: wesommer@mit-trillian.MIT.EDU (William Sommerfeld) Newsgroups: net.lang Subject: Re: Cute little liar program (for hackers only) Message-ID: <722@mit-trillian.MIT.EDU> Date: Wed, 18-Jun-86 00:05:26 EDT Article-I.D.: mit-tril.722 Posted: Wed Jun 18 00:05:26 1986 Date-Received: Thu, 19-Jun-86 19:43:10 EDT References: <7772@watdaisy.UUCP> <605@ittvax.ATC.ITT.UUCP> Reply-To: wesommer@mit-athena.UUCP (William Sommerfeld) Distribution: net Organization: MIT Project Athena Lines: 28 Keywords: C pascal hack Summary: Better than the last one (no warnings) This one works a little better; it doesn't complain when compiled by the Pascal compiler (at least under 4.3BSD) Tricks: - { } is a comment in Pascal, statement delimeters in C. - /*) and (*/ to toggle between 'C' and Pascal. - The only reason to have the #define openbrace in there is so that the Pascal compiler doesn't give you a warning about having an open brace character in the middle of a comment. Anyone want to work on some more obscure ones??? Bill Sommerfeld ARPA: wesommer@athena.mit.edu UUCP: mit-eddie!wesommer (forwards) (*foo); #define openbrace { /*) program main(output); begin writeln('I was compiled by a Pascal compiler.'); end. {*/ main() openbrace puts("I was compiled by a C compiler"); }