home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / hackers / 1962 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.6 KB  |  46 lines

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