home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
- From: holland@matt.ksu.ksu.edu (Rich Holland)
- Newsgroups: alt.hackers
- Subject: Re: obHack [polyglots]
- Date: 23 Jan 1993 12:14:06 -0600
- Organization: Kansas State University
- Lines: 33
- Approved: root@matt.ksu.ksu.edu
- Message-ID: <1js1teINNhq4@matt.ksu.ksu.edu>
- References: <1jhilrINNkjm@newsstand.cit.cornell.edu> <RODNEY.93Jan19163207@cabot.balltown.cma.com> <1jks8bINNsj4@matt.ksu.ksu.edu> <C182ow.BAv@deshaw.com>
- NNTP-Posting-Host: matt.ksu.ksu.edu
-
- christos@deshaw.com (Christos Zoulas) writes:
-
- [i originally wrote]:
-
- >>Does anyone have that little program lying around that was posted sometime
- >>last year that compiles in many languages? It worked in like C, fortran,
- >>pascal, basic, and supposedly as a DOS .COM file....*looking through
- >>my NEWS directory*
-
- >Here it is:
-
- Thanks! I wanted to show a friend, and lost my copy. He didn't think it
- was possible to write something that would work in more than one environment.
- I hacked together a quick fortran/c example to demonstrate it, but POLYGLOT
- *really* does a good job of confusing people. :-)
-
- Here's mine:
-
- char a; /*
- C$NOEXT
- PROGRAM hello
- WRITE (*,*) 'This is a fortran/c program!'
- END
- C*/ main () /*
- C*/ { /*
- C*/ printf("This is a fortran/c program!\n"); /*
- C*/ }
-
- --
- Rich Holland | INTERNET: holland@matt.ksu.ksu.edu
- 100 Jardine Terr., Apt A7 | BITNET : holland@ksuvm
- Manhattan, KS 66502-3357 | UUCP : ...!rutgers!matt.ksu.ksu.edu!holland
- char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
-