"Hello World "program in various avatars of programmming languages

Definition
A "hello world" program is a computer program that simply prints out "Hello, world!" on a display device. It is used in many introductory tutorials for teaching a programming language and many students use it as their first programming experience in a language.
We've all grown up with the "Hello World "program in various avatars of programmming languages.... well how about trying to showcase the Hello world programs in as many languages possible ....
This may give a comarison to the various languages as well give ansight for ppl who want to explore languages that they are keen to find out about .

for eg:
Hello World in C
Code:
    #include <stdio.h>

    int main()
    {
        printf("Hello, world!\n");
        return 0;
    }

NOTE : I started with C to pay respect to the the first HelloWorld program that was actually recorded...and it was in C :)

The tradition of using the phrase "Hello, world!" as the test message was influenced by an example program in the book The C Programming Language, by Brian Kernighan and Dennis Ritchie, published in 1978. The example program from that book prints "hello, world" (i.e., no capital letters, no exclamation sign; those have entered the tradition later). The book had inherited the program from a 1974 Bell Laboraties internal memorandum by Kernigan - Programming in C: A Tutorial, which shows the first known version of the program:

main( ) {
printf("hello, world");
}

However, the first known instance of the usage the words "hello" and "world" together in computer literature is in A Tutorial Introduction to the Language B, by Brian Kernighan, 1973. (http://cm.bell-labs.com/cm/cs/who/dmr/bintro.html)

Other languages you might be interested in ?!
Code:
ABAP4  Actionscript-Flash5  Actionscript-FlashMX  Ada  Algol-60  Algol-68  Amiga-E  APL  AppleScript  ASP-JavaScript  ASP-VBS  Assembler-6502  Assembler-68000-Amiga  Assembler-68000-AtariST  Assembler-68008  Assembler-IBM-370  Assembler-Intel  Assembler-PDP11  Assembler-Z80-Console  Assembler-ZX81  AviSynth  awk  Axel  
B  BAL  Basic  BCPL  Beta  BrainFxxx  BS2000  
C++  C++-ISO  C++-MFC  C++-Qt  C-Ansi  C-Curses  C-GEM  C-Intuition  C-K+R  C-Objective  C-PresManager  C-Sharp  C-Windows  C-X11-Athena  CAML-Light  Clean  Cobol  
D  dBase  Delphi  Dylan  
Eiffel  Elan  Erlang  Euphoria  
Focal  Forth  Fortran  Fortran77  FortranIV  
Gofer  GynkoSoft  
Haskell  HDX  HP-41C  HP-48  HTML  Human  
IBM-Exec  IBM-Exec2  ici  Icon  Informix-4GL  InstallScript  Intercal  
Java  Java-Mobile  Java-Server-Pages  Java-Servlet  JavaScript  JCL  
Limbo  Lingo  Lisp  Logo  Logo-graphical  lua  
MACRO10  mIRC  Modula-2  MSDOS  Mumps  
Natural  NewtonScript  
Oberon.oberon  Oberon.std  Occam  OpenVMS  OPL.dialog  OPL.simple  OZ  
Pascal  Pascal-Windows  Perl  PHP  Pike  PL-SQL  PL1  Pocket  Postscript  POV-Ray  Profan  Prolog  Python  
REALbasic  Rebol-view  Redcode  Rexx  Rexx.simple  Rexx.window  Ruby  
SAL  Sather  Scheme  Self  SenseTalk  Setl2  Shakespeare  Simula  Smalltalk.simple  Smalltalk.window  SML  Snobol  Spiral  SPL  ST-Guide  
Tcl  TeX  Texinfo  TI-59  TI-8x  Tk  TSO-CLIST  Turing  
Unix  
Vatical  VAX-Macro  Verilog  VisualBasic  VMS  
Whitespace  
XHTML

Links for "Hello World " programs in various languages :hap2:
 
First off I'm new to techenclave so wanted to say hi, very interesting post, thought I'd add a couple more languages for you.

Python:

print "Hello World"

Java:

class HelloWorld() {

public static void main(String[] args) {

system.out.println("Hello, World!");

}

}
 
I remember writing 150+ lines of code to show hello world when I was learning win32 sdk. :)
 
Windows scripting VBScript:

wscript.echo("Hello World")

VBScript/VB6:

MsgBox "Hello World"

PL-SQL:

declare @str varchar(20)
set @str = 'Hello World'
print(@str)
GO

C#:

MessageBox.Show("Hello World");

& of course good ol DOS batch

ECHO Hello World

Nice info. BTW Shakespeare programming:rofl:. Never knew this before today. k00l Im gonna learn this.

Something similar is Chef, link followed thru Shakespeare wiki. Here's Hello world source in Chef, copied from wiki

Hello World Souffle.
Ingredients.
72 g haricot beans
101 eggs
108 g lard
111 cups oil
32 zucchinis
119 ml water
114 g red salmon
100 g dijon mustard
33 potatoes
Method.
Put potatoes into the mixing bowl.
Put dijon mustard into the mixing bowl.
Put lard into the mixing bowl.
Put red salmon into the mixing bowl.
Put oil into the mixing bowl.
Put water into the mixing bowl.
Put zucchinis into the mixing bowl.
Put oil into the mixing bowl.
Put lard into the mixing bowl.
Put lard into the mixing bowl.
Put eggs into the mixing bowl.
Put haricot beans into the mixing bowl.
Liquefy contents of the mixing bowl.
Pour contents of the mixing bowl into the baking dish.
Serves 1.

Very amusing:p
 
Here's hello world for th MIPS processor :

.data
hello : .asciiz "Hello World\n"
.text
li $v0 , 4
la $a0, hello
syscall
li $v0 , 10
syscall
 
Back
Top