fork download
  1.  
  2.  
  3. (*O/*_/
  4. Cu #%* )pop mark/CuG 4 def/# 2 def%%%%@@P[TX---P\P_SXPY!Ex(mx2ex("SX!Ex4P)Ex=
  5. CuG #%* *+Ex=
  6. CuG #%*------------------------------------------------------------------*+Ex=
  7. CuG #%* POLYGLOT - a program in eight languages 15 February 1991 *+Ex=
  8. CuG #%* 10th Anniversary Edition 1 December 2001 *+Ex=
  9. CuG #%* *+Ex=
  10. CuG #%* Written by Kevin Bungard, Peter Lisle, and Chris Tham *+Ex=
  11. CuG #%* *+Ex=
  12. CuG #%* Polyglot suports the following languages: *+Ex=
  13. CuG #%* 1. COBOL (ANSI) *+Ex=
  14. CuG #%* 2. Pascal (ISO) *+Ex=
  15. CuG #%* 3. Fortran (ANSI, f77) *+Ex=
  16. CuG #%* 4. C (ANSI-ish) *+Ex=
  17. CuG #%* 5. PostScript *+Ex=
  18. CuG #%* 6. Linux/Unix shell script (bash, sh, csh) *+Ex=
  19. CuG #%* 7. x86 machine language (MS-DOS, Win32, Linux) *+Ex=
  20. CuG #%* 8. Perl (version 5) *+Ex=
  21. CuG #%* *+Ex=
  22. CuG #%* Usage: *+Ex=
  23. CuG #%* 1. Rename this file to polyglot.[cob|pas|f77|c|ps|sh|com|pl] *+Ex=
  24. CuG #%* *+Ex=
  25. CuG #%* 2. Compile and run with your favorite compiler and operating *+Ex=
  26. CuG #%* system. *+Ex=
  27. CuG #%* *+Ex=
  28. CuG #%* Notes: *+Ex=
  29. CuG #%* 1. We have attempted to use only standard language features. *+Ex=
  30. CuG #%* *+Ex=
  31. CuG #%* 2. Without the -traditional flag gcc will issue a warning. *+Ex=
  32. CuG #%* *+Ex=
  33. CuG #%* 3. When transferring from Unix to DOS make sure that a LF *+Ex=
  34. CuG #%* is correctly translated into a CR/LF. *+Ex=
  35. CuG #%* *+Ex=
  36. CuG #%* 4. Keep the blank lines at the start of the program. They *+Ex=
  37. CuG #%* are important. *+Ex=
  38. CuG #%* *+Ex=
  39. CuG #%* 5. This text is a comment block in all eight languages. *+Ex=
  40. CuG #%* *+Ex=
  41. CuG #%* Please mail any comments, corrections or additions to *+Ex=
  42. CuG #%* polyglot@ideology.com.au *+Ex=
  43. CuG #%* *+Ex=
  44. CuG #%*------------------------------------------------------------------*QuZ=
  45. CuG #%* *+Ex=
  46. CuG #%*!Mx)ExQX5ZZ5SSP5n*5X!)Ex+ExPQXH,B+ExP[-9A-9B(g?(gA'UTTER_XYZZXX!X *+
  47. CuG #(* *(
  48. C # */); /*(
  49. C # *) program polyglot (output); (*+
  50. C # identification division.
  51. C # program-id. polyglot.
  52. C #
  53. C # data division.
  54. C # procedure division.
  55. C #
  56. C # * ))cleartomark /Bookman-Demi findfont 36 scalefont setfont (
  57. C # * (
  58. C #
  59. C # * hello polyglots$
  60. C # main.
  61. C # perform
  62. C /# * ) 2>_$$; echo "hello polyglots"; rm _$$; exit;
  63. C # * (
  64. C #
  65. C *0 ) unless print "hello polyglots\n"; __END__
  66. C stop run.
  67. -*, 'hello polyglots'
  68. C
  69. C display "CI-3641 Rocks!s". (
  70. C */ int i; /*
  71. C */ main () { /*
  72. C */ i=printf ("CI-3641 Rocks!\n"); O= &i; return *O; /*
  73. C *) (*
  74. C *) begin (*
  75. C *) writeln ('CI-3641 Rocks!'); (*
  76. C *) (* )
  77. C * ) pop 60 360 (
  78. C * ) pop moveto (CI-3641 Rocks!) show (
  79. C * ) pop showpage ((
  80. C *)
  81. end .(* )
  82. C)pop% program polyglot. *){*/}
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
hello polyglots