I think OCaml is still missing:

print_endline "Hello World!";;

Two GUI versions: The first one with the built in Graphics module:

Graphics.open_graph " 80x20";;
Graphics.moveto 5 5;;
Graphics.draw_string "Hello World";;
read_line ()

And one with Tk:

open Tk

let top = openTk ()
let l = Label.create top ~text:"Hello World";;
pack [l]
let _ = Printexc.print mainLoop ()

LispSharp (Lsharp or L#) is a free Lisp based scripting language for .NET from:
http://www.lsharp.org/
It can be run on its own or included into a .NET language like C#

(WriteLine Console "Hello World! using Lsharp")

Ruby, ah so popular in Japan! This one uses the tk GUI ...

require 'tk'
root = TkRoot.new { title "Ruby & Tk" }
TkLabel.new(root) {
  text 'Hello World!  Ruby using the tk GUI'
  pack {  }
}
Tk.mainloop

Would be nice to get an F# example!

A BF version of the "Hello World!" programme! By your very own BF programmer!

[++++++++++[>+++++++>++++++++++>+++>+<<<<-]
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.
+++.------.--------.>+>.
Member Avatar for GreenDay2001

Here's something in Flash(nah, using actionscript)

_root.createTextField("vishesh", 1, 50, 50, 100, 50);
vishesh.text = "Hello World";

ASP

<% Response.write("Hello World") %>

JavaScript

<script type="text/javascript>
Doocument.write("hello world");
</script>

C++

# include <iostream.h>
# include <conio.h>

int main()
{
       clrscr();
       cout << "Hello World!";
       getch();
       return 0;
}

Simple Window using C++

// window.cpp
// Windows Template
// vishesh yadav

# include <windows.h>

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

char szProgName[] = "ProgName";

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPreInst, LPSTR lpszCmdLine, int nCmdShow)
{
    HWND hWnd;
    MSG lpMsg;
    WNDCLASS wcApp;

    wcApp.lpszClassName = szProgName;
    wcApp.hInstance = hInst;
    wcApp.lpfnWndProc = WndProc;
    wcApp.hCursor = LoadCursor(NULL, IDC_ARROW);
    wcApp.hIcon = 0;
    wcApp.lpszMenuName = 0;
    wcApp.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
    wcApp.style = CS_HREDRAW | CS_VREDRAW;
    wcApp.cbClsExtra = 0;
    wcApp.cbWndExtra = 0;

    if(!RegisterClass (&wcApp))
        return 0;

    hWnd = CreateWindow(szProgName, "Windows Template", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInst, (LPSTR)NULL);
    ShowWindow(hWnd, nCmdShow);
    UpdateWindow(hWnd);

    while(GetMessage(&lpMsg, 0 , 0 , 0)) {
        TranslateMessage(&lpMsg);
        DispatchMessage(&lpMsg);
    }
    return(lpMsg.wParam);
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT messg, WPARAM wParam, LPARAM lParam)
{
    HDC hdc;
    PAINTSTRUCT ps;

    switch(messg)
    {
        case WM_PAINT:
            hdc = BeginPaint(hWnd, &ps);

            TextOut(hdc, 200, 100, "Hello World!", 11);

            ValidateRect(hWnd, NULL);
            EndPaint(hWnd, &ps);
            break;

        case WM_DESTROY:
            PostQuitMessage(0);
            break;

        default:
            return(DefWindowProc(hWnd, messg, wParam, lParam));
            break;
        }

        return(0);
}

From a very shy Lisp person ...

(write-line "Hello World! in Common-Lisp")

Don't be :cheesy:
Lisp is amazing. I program in it, now, almost exclusively.

Now, here's an example supplying you have a Lisp REPL (interpreter) - like CLISP - installed to /usr/local/bin:

#!/usr/local/bin/clisp
;; USAGE: helloworld.lisp message
(defun bprint (line)
  (if (null line) (format t "~%|~79t|") (format t "~%|~3t~a~79t|" line)))
 
(defun div-line (char &optional leading-space count)
  (if leading-space
      ((lambda (a b)
          (format t "~% ")
          (dotimes (i (if (null a) 78 (- 1 a)))
            (format t "~a" b))) count char)
    ((lambda (a b) 
       (format t "~%")
       (dotimes (i (if (null a) 79))
         (format t "~a" b))) count char)))
 
(div-line #\-)
(bprint (if (null (first *args*)) "Hello world!"))
(div-line #\-)

:cheesy:
Hello world done in Lisp, with a bit of fancy output.

Haskell is really a very comprehensive computer language used by many universities. You can gain some hands-on experience by downloading the small Haskell interpreter called Hugs from:
http://haskell.org/hugs

putStrLn "Hello World! using Hugs the neat little Haskell interpreter"

Let's see. "A multilingual coded Hello World! thread". In BASIC:

print "Hello Wereld"      ' Dutch
print "Hello World"       ' English
print "Bonjour Monde"     ' French
print "Hallo Welt"        ' German
print "Γειάσου κόσμος"    ' Greek
print "Ciao Mondo"        ' Italian
print "Hello Mundo"       ' Portugese
print "Здравствулте! Мир" ' Russian
print "Hola Mundo"        ' Spanish
end

Thanks to Babel Fish :mrgreen:

Hello Mundo? We portuguese native speakers are very angry at you and Babel Fish.

BTW, olá mundo!

Here is a little fun "Hallo World" using RUBY.
Ruby is free from: http://www.rubycentral.com/

for s in ('ollaF'..'ollaP')
    printf("%s World!\n", s.reverse)
end
gets()  # console wait

Easy language to learn, great documentation, lots of examples.

Caffe latte anyone?

{\def \hello "Hello World! using Latte"}
{\head {\title \hello}}
{\body \hello}
output = "Hello World! in Snobol"

From Brazil comes the interesting language Lua
(Portuguese for moon). I am having fun with Lua!

io.write("Hello World! using Lua 5.0")
-- or
print("Hello World!")

Grr... I wanted to do Lua... It doesn't matter. Maybe I'll do one in the language that my friend wrote?

# A simple HELLOWORLD program written in SapphireX
prog.main()
{
     con.wl("Hello World! (In SapphireX)
};
prog.stop()
prog.pause()

A BF version of the "Hello World!" programme! By your very own BF programmer!

[++++++++++[>+++++++>++++++++++>+++>+<<<<-]
>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.
+++.------.--------.>+>.

Why would you have wasted your time learning the "Brain****" language? I took one look a while ago and I just said yeah, uhh NO.

DrScheme is a free IDE that handles a variety of scheme implementations from student to professional levels. Even comes with a GUI builder. You can download it from:
http://download.plt-scheme.org/drscheme/

Here is the Hallo World in scheme ...

; my first program
(begin
  (display "Hello World! using DrScheme")
  (newline))

I knew there was a sorter version in assembly code ...

jmp string
code:
        pop ecx
        mov al, 4
        mov bl, 1
        mov dl, 14
        int 0x80
        mov al, 1
        xor bl, bl
        int 0x80
string:
        call code
        db "Hello, World! in ASM", 0x0A
output = "Hello World! in Snobol"

For all VMS users..

$!For OpenVMS users running a terminal emulator
$TYPE/PAGE NL:
$WRITE SYS$OUTPUT "Hello World (In DCL) "
$EXIT
[End of file]

Showing off with a C# WindowsApplication:

using System;
using System.Windows.Forms;
 
namespace WindowsApplicationHello
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if (disposing)
{
if (components != null) 
{
components.Dispose();
}
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
// 
// label1
// 
this.label1.BackColor = System.Drawing.Color.Brown;
this.label1.Font = new System.Drawing.Font("Comic Sans MS", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Gold;
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(392, 88);
this.label1.TabIndex = 0;
this.label1.Text = "Hello World!";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// 
// Form1
// 
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.BackColor = System.Drawing.Color.DarkGreen;
this.ClientSize = new System.Drawing.Size(408, 104);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Csharp Rules!";
this.ResumeLayout(false);
}
static void Main() 
{
Application.Run(new Form1());
}
}
}

I have mention Lsharp before, a Lips based scritping language for the .NET environment. This code shows a GUI program, and looks a little bit like the previous C# post ...

;;; Scripting a .NET GUI with Lsharp, free from www.lsharp.org
 
(reference "System.Windows.Forms")
(reference "System.Drawing")
(using "System.Drawing")
(using "System.Windows.Forms")
 
;; Create a form
(= form (new System.Windows.Forms.Form))
(set_Text form "Hello from Lsharp")
 
;; Create a label
(= label1 (new System.Windows.Forms.Label))
(set_Text label1 "Hello World!")
(set_Size label1 (new System.Drawing.Size 224 23))
(set_Location label1 (new System.Drawing.Point 24 16))
 
(add (Controls form) label1)
(showdialog form)

The D language is a combination of concepts from C, C++, Python and Ruby from:
http://www.digitalmars.com/d/
(compiled via 'dmd.exe hello.d' to give 'hello.exe')

import std.c.stdio;  // getchar()
int main()
{
    printf("Hello World! in D language");
 
    getchar();  // console key wait
    return 0;
}

The experimental computer language 'Nemerle' (http://nemerle.org/) allows you to mix object oriented and functional programming styles. It can use library code from .NET or Mono. The syntax looks a little bit like C#.
OOP style:

class Hello {
  static Main () : void {
    System.Console.WriteLine ("Hello world! using Nemerle");
  }
}

]
Simple functional style:

System.Console.WriteLine("Hello world! using Nemerle");

Or in english:

"Hello world." (dont forget the full stop)

(define (hello ) (method () (print "Hello World! in Dylan")))

I am just fooling around with the latest version of MinGW ...

// a simple windows "Hello World!" program
// compile and link with MinGW's ([URL]http://www.mingw.org[/URL]) gcc.exe
// command --> gcc -o myfile myfile.c -mwindows
 
#include <windows.h>
 
int WINAPI WinMain (HINSTANCE hInstance, 
                    HINSTANCE hPrevInstance, 
                    PSTR szCmdLine, 
                    int iCmdShow) 
{
  MessageBox (NULL, "Hello World!", "Hello Demo", MB_OK);
  return (0);
}

I cannot believe that you folks forget the mighty 4GL!!

# Hello World in Informix 4GL

MAIN
DISPLAY "Hello World (Informix 4GL)"
END MAIN

CALL 3R5 macro language for OS2200:

"
" Hello world example 05 Sep 2007
"
macro(nodebug);
[INDENT]print 'Hello world!';   " Print the bugger[/INDENT]
endmacro;

Fun with shell scripting!

The boring approach:

#!/bin/bash
echo Hello World!

and an arguably less boring approach:

#!/bin/bash
## Clears the screen and builds the user input screen
function screen() {
clear
tput bold
cat <<EOF
Hello World!
EOF
tput rmso
}
## Display the screen
screen

Smalltalk hello world

Transcript show: 'hello world'.

or

Dialog warn: 'hello world'.

or

'hello world' inspect.

You know after reading this thread and the various hello world samples I wonder how I got through my COBOL and RPG classes.

Heh, y'all missed my favorite really stupid language: Whitespace.

Say hello.

Source: whitespace examples.

BTW. That "Say Hello." thing at the top is just a comment...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.