Hello World Back to the Win32 Shootout
Back to dada's perl lab

[The Original Shootout]   [NEWS]   [FAQ]   [Methodology]   [Platform Details]   [Acknowledgements]   [Scorecard]  
All Source For Hello World
hello.awka
# $Id: hello.gawk,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

BEGIN { print "hello world" }
hello.bcc
/* -*- mode: c -*-
 * $Id: hello.gcc,v 1.2 2001/06/18 01:13:58 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 */

#include <stdio.h>

int main() {
    fputs("hello world\n", stdout);
    return(0);
}

hello.bigforth
\ $Id: hello.bigforth,v 1.1 2001/06/19 16:20:46 doug Exp $
\ http://www.bagley.org/~doug/shootout/

." hello world" cr bye
hello.cim
% $Id: hello.cim,v 1.2 2002/05/16 15:38:00 dada Exp $
begin
    OutText("hello world");
    OutImage;
end
hello.csharp
// $Id: hello.csharp,v 1.0 2002/02/14 11:40:00 dada Exp $
// http://dada.perl.it/shootout/

using System;

class App {

    public static int Main(String[] args) {
        Console.WriteLine("hello world\n");
        return(0);
    }
}
hello.cygperl
#!/usr/local/bin/perl
# $Id: hello.perl,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

print "hello world\n";
hello.delphi
program hello;


begin
  write('hello world'#13#10);
end.
 
hello.elastic
// $Id: hello.elastic,v 1.0 2002/05/09 15:48:00 dada Exp $
package hello;
import basic;
basic.print("hello world\n");
hello.erlang
%%% -*- mode: erlang -*-
%%% $Id: hello.erlang,v 1.1 2001/06/17 22:00:34 doug Exp $
%%% http://www.bagley.org/~doug/shootout/

-module(hello).
-export([main/0]).

main() -> io:fwrite("hello world\n", []), halt(0).
hello.fpascal
program hello;
uses SysUtils;

begin
    WriteLn( 'hello world' );
end.
hello.gawk
# $Id: hello.gawk,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

BEGIN { print "hello world" }
hello.gcc
/* -*- mode: c -*-
 * $Id: hello.gcc,v 1.2 2001/06/18 01:13:58 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 */

#include <stdio.h>

int main() {
    fputs("hello world\n", stdout);
    return(0);
}

hello.gforth
\ $Id: hello.gforth,v 1.1 2001/06/17 22:00:34 doug Exp $
\ http://www.bagley.org/~doug/shootout/

." hello world" cr bye
hello.ghc
-- $Id: hello.ghc,v 1.1 2001/06/17 22:00:34 doug Exp $
-- http://www.bagley.org/~doug/shootout/

main = do putStrLn "hello world"
hello.gnat
-- $Id: hello.gnat,v 1.0 2003/06/11 12:04:00 dada Exp $
-- http://dada.perl.it/shootout/
-- Ada 95 code by C.C.

with Ada.Text_IO;
procedure Hello is
begin
   Ada.Text_IO.Put_Line ("hello world");
end Hello;

hello.guile
#!/usr/local/bin/guile \
-e main -s
!#
;;; $Id: hello.guile,v 1.1 2001/06/17 22:00:34 doug Exp $
;;; http://www.bagley.org/~doug/shootout/

(define (main args) (display "hello world") (newline))
hello.ici
// $Id: hello.ici,v 1.0 2003/01/03 12:11:00 dada Exp $
// http://dada.perl.it/shootout
//
// contributed by Tim Long

put("hello world\n");
hello.icon
# -*- mode: icon -*-
# $Id: hello.icon,v 1.2 2001/06/18 01:04:15 doug Exp $
# http://www.bagley.org/~doug/shootout/

procedure main(argv)
    write("hello world")
end
hello.java
// $Id: hello.java,v 1.1 2001/06/17 22:00:34 doug Exp $
// http://www.bagley.org/~doug/shootout/

public class hello {
    public static void main(String args[]) {
    System.out.print("hello world\n");
    }
}
hello.jscript
WScript.Echo( "hello world" );
hello.lcc
/* -*- mode: c -*-
 * $Id: hello.gcc,v 1.2 2001/06/18 01:13:58 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 */

#include <stdio.h>

int main() {
    fputs("hello world\n", stdout);
    return(0);
}

hello.lua
-- $Id: hello.lua,v 1.1 2001/06/17 22:00:34 doug Exp $
-- http://www.bagley.org/~doug/shootout/

write("hello world\n")
hello.lua5
-- $Id: hello.lua,v 1.1 2001/06/17 22:00:34 doug Exp $
-- http://www.bagley.org/~doug/shootout/
-- contributed by Roberto Ierusalimschy

print("hello world")

hello.mawk
# $Id: hello.mawk,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

BEGIN { print "hello world" }
hello.mercury
%% $Id: hello.mercury,v 1.2 2001/06/18 01:13:58 doug Exp $
%% http://www.bagley.org/~doug/shootout/

:- module mytest.

:- interface.

:- import_module io.

:- pred main(io__state, io__state).
:- mode main(di, uo) is det.

main --> io__write_string("hello world\n").

hello.mingw32
/* -*- mode: c -*-
 * $Id: hello.gcc,v 1.2 2001/06/18 01:13:58 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 */

#include <stdio.h>

int main() {
    fputs("hello world\n", stdout);
    return(0);
}

hello.modula2
(* The Great Win32 Language Shootout http://dada.perl.it/shootout/

   contributed by Isaac Gouy (Modula2 novice)

   To build: xc =m hello
   To run:   hello
*)

MODULE Hello;

FROM STextIO IMPORT WriteString, WriteLn;

BEGIN
  WriteString ("hello world"); WriteLn;
END Hello.
hello.modula3

MODULE Main;
IMPORT Wr, Stdio;
BEGIN
    Wr.PutText (Stdio.stdout, "hello world\n");
    Wr.Close (Stdio.stdout);
END Main.
hello.nice
/* The Great Win32 Language Shootout http://dada.perl.it/shootout/ 
   contributed by Isaac Gouy (Nice novice)

   Transliterated from the Java implementation

To compile:	
   nicec --sourcepath=.. -a hello.jar hello

To run:
   java -jar hello.jar
*/


void main(String[] args){ 
   println("hello world"); 
}
hello.ocaml
(*
 * $Id: hello.ocaml,v 1.1 2001/06/17 22:00:34 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 *)

let _ = print_endline "hello world"
hello.ocamlb
(*
 * $Id: hello.ocaml,v 1.1 2001/06/17 22:00:34 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 *)

let _ = print_endline "hello world"
hello.oz
%%% $Id: hello.oz,v 1.0 2002/03/12 12:44:00 dada Exp $
%%% http://dada.perl.it/shootout/
functor
import System Application
define
    {System.printInfo "hello world"}
    {Application.exit 0}
end
hello.parrot
        print "hello world\n"
        end
hello.perl
#!/usr/local/bin/perl
# $Id: hello.perl,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

print "hello world\n";
hello.php
#!/usr/local/bin/php -f<?php
/*
 $Id: hello.php,v 1.1 2001/06/17 22:00:34 doug Exp $
 http://www.bagley.org/~doug/shootout/
*/
print "hello world\n";
?>
hello.pike
#!/usr/local/bin/pike// -*- mode: pike -*-
// $Id: hello.pike,v 1.2 2001/06/18 01:01:47 doug Exp $
// http://www.bagley.org/~doug/shootout/

int main() { write("hello world\n"); }

hello.pliant
# $Id: hello.pliant,v 1.0 2002/02/11 16:58:00 dada Exp $
# http://dada.perl.it/shootout/

console "hello world[lf]"
hello.poplisp
;;; -*- mode: lisp -*-
;;; $Id: hello.poplisp,v 1.0 2002/05/07 12:32:00 dada Exp $

(write-line "hello world")
hello.python
#!/usr/local/bin/python
# $Id: hello.python,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

print "hello world"
hello.rexx
say "hello world"
hello.ruby
#!/usr/local/bin/ruby
# -*- mode: ruby -*-
# $Id: hello.ruby,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

puts "hello world"
hello.se
-- -*- mode: eiffel -*-
-- $Id: hello.se,v 1.2 2001/06/18 01:13:58 doug Exp $
-- http://www.bagley.org/~doug/shootout/

class HELLO

creation make

feature
   make is
      local
      do
         std_output.put_string("hello world")
         std_output.put_new_line
      end
end
hello.slang
% $Id: hello.slang,v 1.0 2003/01/03 12:44:00 dada Exp $
% http://dada.perl.it/shootout/
%
% contributed by John E. Davis

vmessage("hello world");
hello.smlnj
(* -*- mode: sml -*-
 * $Id: hello.smlnj,v 1.2 2001/07/09 00:25:28 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 *)

structure Test : sig
    val main : (string * string list) -> OS.Process.status
end = struct

fun main(name, args) = 
  let in print "hello world\n"; OS.Process.success end;

end

val _ = SMLofNJ.exportFn("hello", Test.main);
hello.tcl
#!/usr/local/bin/tclsh
# $Id: hello.tcl,v 1.1 2001/06/17 22:00:34 doug Exp $
# http://www.bagley.org/~doug/shootout/

puts "hello world"
hello.vbscript
WScript.Echo( "hello world" )
hello.vc
/* -*- mode: c -*-
 * $Id: hello.gcc,v 1.2 2001/06/18 01:13:58 doug Exp $
 * http://www.bagley.org/~doug/shootout/
 */

#include <stdio.h>

int main() {
    fputs("hello world\n", stdout);
    return(0);
}

hello.vc++
// -*- mode: c++ -*-
// $Id: hello.g++,v 1.3 2001/06/20 03:20:02 doug Exp $
// http://www.bagley.org/~doug/shootout/

#include <iostream>

using namespace std;

int main() {
    cout << "hello world" << endl;
    return(0);
}
hello.vpascal
program hello;
uses SysUtils;

begin
    WriteLn( 'hello world' );
end.