Computer Programming/Hello world

The following is a list of Hello, world! programs.

Hello, world! programs make the text "Hello, world!" appear on a computer screen. It is usually the first program encountered when learning a programming language. Otherwise, it's a basic sanity check for an installation of a new programming language. If "Hello World" does not run, one must not try to develop complex programs before fixing the issues with the installation.

For even more languages have a look at the Hello World Collection.

4DOS batch
''It should be noted that the 4DOS/4NT batch language is a superset of the MS-DOS batch language. ''

Ingres 4GL
message "Hello, world!" with style = popup;

ABAP Objects (NetWeaver 7)
The example below makes use of the singleton pattern and outputs the text in a message box instead of a classic list output.

ABC
WRITE "Hello, world!"

ActionScript 1.0 and 2.0
This will output to the output window only, which an end user would not see.

This version will be visible to the end user.

ALGOL 68
The ALGOL 68 standard requires that reserved-words, types and operators are in a different typeface. Hence programs are typically published in either bold or an underline typeface, e.g.:

begin printf($"Hello, world!"l$) end

In the popular upper-case stropping convention for bold words: or using a wikitext like quote stropping, this is especially suitable on computers with only 6 bits per character (hence only have UPPERCASE): or minimally using the "brief symbol" form of begin and end.

AmigaE
PROC main WriteF('Hello, world!'); ENDPROC

AMX NetLinx
This program sends the message out via the Diagnostics Interface after start-up.

program_name = 'Hello' define_start send_string 0,'Hello World!'

APL

 * The Del on the first line begins function definition for the program named HWΔPGM. It is a niladic function (no parameters, as opposed to monadic or dyadic) and it will return an explicit result which allows other functions or APL primitives to use the returned value as input.


 * The line labeled 1 assigns the text vector 'Hello, world!!' to the variable R


 * The last line is another Del which ends the function definition.

When the function is executed by typing its name the APL interpreter assigns the text vector to the variable R, but since we have not used this value in another function, primitive, or assignment statement the interpreter returns it to the terminal, thus displaying the words on the next line below the function invocation.

The session would look like this

HWΔPGM Hello, world!!

While not a program, if you simply supplied the text vector to the interpreter but did not assign it to a variable it would return it to the terminal as output. Note that user input is automatically indented 6 spaces by the interpreter while results are displayed at the beginning of a new line.

'Hello, world!' Hello, world!!

AppleScript
or:

ASP

 * or simply:

ASP.NET
or

or

Hello World!

Accumulator-only architecture: DEC PDP-8, PAL-III assembler
See the example program in the Wikipedia PDP-8 article.

Accumulator/Index microcoded machine: Data General Nova, RDOS
See the example section of the Nova article.

Expanded accumulator machine: Intel x86, Microsoft Windows, FASM
Example of making 32-bit PE program as raw code and data:

Using FASM import macro, unicode (MessageBoxW is one of few unicode functions 'supported' by Windows 9x/ME) and section sharing, no relocation (not required for 32-bit Windows NT executables, recommended for DOS-based Windows, required for x64), no heap - Not a beginners example but only 1024 instead of 3072 bytes:

General-purpose fictional computer: MIX, MIXAL
TERM   EQU    19          console device no. (19 = typewriter) ORIG  1000        start address START  OUT    MSG(TERM)   output data at address MSG HLT               halt execution MSG    ALF    "HELLO" ALF   " WORL" ALF   "D    " END   START       end of program

General-purpose fictional computer: MMIX, MMIXAL
string BYTE   "Hello, world!",#a,0   string to be printed (#a is newline and 0 terminates the string) Main GETA   $255,string            get the address of the string in register 255 TRAP  0,Fputs,StdOut         put the string pointed to by register 255 to file StdOut TRAP  0,Halt,0               end process

Mainframe: IBM z/Architecture series using BAL
HELLO   CSECT               The name of this program is 'HELLO' USING *,12         Tell assembler what register we are using SAVE (14,12)       Save registers LR   12,15         Use Register 12 for this program WTO  'Hello, world!' Write To Operator RETURN (14,12)     Return to calling party END HELLO          This is the end of the program

RISC processor: ARM, RISC OS, BBC BASIC's in-line assembler
or the even smaller version (from qUE);

SWI "OS_WriteS":EQUS "Hello, world!":EQUB0:ALIGN:MOV PC,R14

AutoHotkey
(The comma after the command name is optional.)

Avenue (scripting language for ArcView GIS)
MsgBox("Hello, world!","aTitle")

B
This is the first known Hello, world! program ever written:

Baan Tools
Also known as Triton Tools on older versions. On Baan ERP you can create a program on 3GL or 4GL mode.

3GL Format
function main {    message("Hello, world!") }

4GL Format
choice.cont.process: on.choice: message("Hello, world!") On this last case you should press the Continue button to show the message.

Bash or sh
or

or using the C preprocessor

General
The following example works for any ANSI/ISO-compliant BASIC implementation, as well as most implementations built into or distributed with microcomputers in the 1970s and 1980s (usually some variant of Microsoft BASIC): Note that the "END" statement is optional in many implementations of BASIC.

Some implementations could also execute instructions in an immediate mode when line numbers are omitted. The following examples work without requiring a RUN instruction.

Later implementations of BASIC allowed greater support for structured programming and did not require line numbers for source code. The following example works when RUN for the vast majority of modern BASICs. Again, the "END" statement is optional in many BASICs.

DarkBASIC
or

Note: In the "classic" Dark Basic the WAIT KEY command is optional as the console goes up when the program has finished.

FreeBasic
or

or

or

Liberty BASIC
To write to the main window:

Or drawn in a graphics window:

PBASIC
or, the typical microcontroller Hello, world! program equivalent with the only output device present being a light-emitting diode (LED) (in this case attached to the seventh output pin):

PureBasic
or or

QB64
PRINT "Hello, World"                                                                                                                                                                                                    END Same for QBasic

TI-BASIC
On TI calculators of the TI-80 through TI-86 range:



Note: "!" character is not on the keypad. It can be accessed from "Catalog" menu, "Probability" menu, or "Math" menu (as factorial notation).

On TI-89/TI-89 Titanium/TI-92(+)/Voyage 200 calculators:

:Prgm :Disp "Hello, world!" :EndPrgm

Visual Basic
or or Alternatively, copy this into a New Form:

PICK/BASIC, DATA/BASIC, MV/BASIC
In addition to the ANSI syntax at the head of this article, most Pick operating system flavors of Dartmouth BASIC support extended syntax allowing cursor placement and other terminfo type functions for VDT's

X, Y positioning (colon ":" is the concatenation instruction): Will display the string "Hello, world!" roughly centered in a 80X24 CRT.

Other functions: Will clear the screen before displaying the string "Hello, world!" roughly centered in a 80X24 CRT.

Syntax variants: CRT "Hello, world!" Supporting the "@" functions above, the CRT statement ignores previous PRINTER statements and always sends output to the screen.

Some Pick operating system environments such as OpenQM support the DISPLAY variant of PRINT. This variant in addition to the "@" functions maintains pagination based upon the settings of the TERM variable: DISPLAY "Hello, world!"

Batch (MS-DOS)
or or or

bc
"Hello, world!"

or, with the newline

BCPL
GET "LIBHDR" LET START BE $(     WRITES ("Hello, world!*N") $)

BITGGAL AgileDog
T  1 "Hello, World" 0

BITGGAL Jihwaja
J( 1 TM 5 ZV 3 "Hello, world" )

BLISS
%TITLE 'HELLO_WORLD' MODULE HELLO_WORLD (IDENT='V1.0', MAIN=HELLO_WORLD,        ADDRESSING_MODE (EXTERNAL=GENERAL)) = BEGIN LIBRARY 'SYS$LIBRARY:STARLET'; EXTERNAL ROUTINE LIB$PUT_OUTPUT; GLOBAL ROUTINE HELLO_WORLD = BEGIN LIB$PUT_OUTPUT(%ASCID %STRING('Hello, world!')) END; END ELUDOM

boo
See also GUI section.

Burning Sand 2
WRITE ELEMENT:Earth 210 230 40 CENTER TEXT "Hello World!"

Calprola
This program will work on the Avasmath 80 online programmable calculator. #END
 * 1) BTN A1
 * 2) PRI "HELLO WORLD!"

C/AL - MBS Navision
OBJECT Codeunit 50000 HelloWorld {  PROPERTIES {    OnRun=BEGIN MESSAGE(Txt001); END; }  CODE {    VAR Txt001@1000000000 : TextConst 'ENU=Hello, world!'; BEGIN {      Hello, world! in C/AL (Microsoft Business Solutions-Navision) }    END. } }

Casio FX-9750
This program will work on the fx-9750 graphing calculator and compatibles.

"Hello, world!" &crarr;

or

Locate 1,1,"Hello, world!" &crarr;

CCL
call echo("Hello, world!")

Ch
The above C code can run in Ch as examples. The simple one in Ch is:

Chuck
<<<"Hello World">>>;

Chrome
namespace HelloWorld; interface type HelloClass = class public class method Main; end; implementation class method HelloClass.Main; begin System.Console.WriteLine( 'Hello, world!' ); end; end.

CintieFramework (VisualBasic.NET)


Clipper
or or

CLIST
PROC 0 WRITE Hello, world!

CLU
start_up = proc po: stream := stream$primary_output stream$putl (po, "Hello, world!") end start_up

COBOL
The above is a very abbreviated and condensed version, which omits the author name and source and destination computer types.

CoffeeScript
CoffeeScript is a language that compiles into JavaScript. Like JavaScript, it does not have native (built in) input or output routines, instead relying on the facilities provided by its host environment.

Using an alert that uses a standard Web browser's window object (window.alert)

or, from Firebug, Apple Safari, or Google Chrome debug console, or Node.js console

ColdFusion (CFML)
or

Cube
Function | Main WriteLine | "Hello, world" End | Main

The '|' represents the separation of the two text fields in the Cube standard IDE.

C#
See also GUI section.

D
Tango version:

Dart
Or,

DC, an arbitrary precision calculator
[Hello, world!]p or 1468369091346906859060166438166794P In the second example, DC stores the decimal number as a sequence of bits, and then the "P" tells DC to interpret those bits as a string and print it.

DCL batch
$ write sys$output "Hello, world!"

DOLL
this::operator { import system.cstdio; puts("Hello, world!"); }

Dream Maker
mob Login ..        world << "Hello, world!"

EAScripting
set disp to "Hello, world!" set dispto to item unit 5 //5 = default screen release disp into dispto.

This would be a pure system call

import system ea.helloworld wait

Ed and Ex (Ed extended)
a Hello, world!! . p

Erlang
See also GUI section.

Factor
or gui version

Falcon
printl( "Hello world" )

Ferite
uses "console"; Console.println("Hello, world!");

filePro
@once: mesgbox "Hello, world!" ; exit

Fjölnir
"halló" < main {   main -> stef stofn skrifastreng("Halló, veröld!"), stofnlok } * "GRUNNUR" ;

FOCAL
type "Hello, world!",! or t "Hello, world!",!

Focus
-TYPE Hello, world!

Forte TOOL
begin TOOL HelloWorld; includes Framework; HAS PROPERTY IsLibrary = FALSE; forward Hello; -- START CLASS DEFINITIONS class Hello inherits from Framework.Object has public method Init; has property shared=(allow=off, override=on); transactional=(allow=off, override=on); monitored=(allow=off, override=on); distributed=(allow=off, override=on); end class; -- END CLASS DEFINITIONS -- START METHOD DEFINITIONS method Hello.Init begin super.Init; task.Part.LogMgr.PutLine('Hello, world!'); end method; -- END METHOD DEFINITIONS HAS PROPERTY CompatibilityLevel = 0; ProjectType = APPLICATION; Restricted = FALSE; MultiThreaded = TRUE; Internal = FALSE; LibraryName = 'hellowor'; StartingMethod = (class = Hello, method = Init); end HelloWorld;

Forth
or instead of compiling a new routine, one can type directly in the Forth interpreter console CR ." Hello, world!" CR

Fril
?((pp "Hello, world!"))

or

pp "Hello, world!"

Frink
println["Hello, world!"]

Gambas
See also GUI section.

PUBLIC SUB Main Print "Hello, world!" END

GEMBase 4GL
procedure_form hello begin_block world print "Hello, world!" end_block end_form

GeneXus
Msg("Hello World")

GML (Game Maker Language)
In the draw event of some object: Or to show a splash screen message:

GraalScript 1
if (created) { echo Hello, world!; }

GraalScript 2
function onCreated { echo("Hello, world!"); }

Harbour
? "Hello, world!"

or

@1,1 say "Hello, world!"

or

Qout("Hello, world")

Heron
program HelloWorld; functions { _main { print_string("Hello, world!"); } } end

HP 33s
(Handheld Hewlett-Packard RPN-based scientific calculator.)

LBL H SF 10 EQN RCL H RCL E RCL L RCL L RCL O R/S RCL W RCL O RCL R RCL L RDL D ENTER R/S

HP-41 & HP-42S
(Handheld Hewlett-Packard RPN-based alphanumeric engineering calculators.)

01 LBLTHELLO 02 THello, world! 03 PROMPT

HyperTalk (Apple HyperCard's scripting programming language)
or

Io
or

Iptscrae
ON ENTER { "Hello, " "world!" & SAY }

Jal
include 16f877_20 include hd447804 hd44780_clear hd44780 = "H" hd44780 = "e" hd44780 = "l" hd44780 = "l" hd44780 = "o" hd44780 = " " hd44780 = "W" hd44780 = "o" hd44780 = "r" hd44780 = "l" hd44780 = "d" hd44780 = "!"

Java
See also GUI section.

Java byte-code
(disassembler output of )

JavaFX Script
JavaFX Script was a scripting language formerly called F3 for Form Follows Function. It was discontinued by Oracle in 2010.

This program can also be written in this way:

A simple console output version would be:

Or even simpler (with a built-in function):

JavaScript
JavaScript does not have native (built in) input or output routines. Instead it relies on the facilities provided by its host environment.

Using a standard Web browser's document object or with an alert, using a standard Web browser's window object (window.alert)

or, from the Mozilla command line implementation

or, from the Windows Script Host

or, from Firebug, Apple Safari, or Google Chrome debug console

Joy
"Hello, world!\n" putchars.

JSP
or just or literally

Hello, world!

Kogut
WriteLine "Hello, world!"

KPL (Kids Programming Language)
Program HelloWorld Method Main ShowConsole ConsoleWriteLine("Hello, world!") End Method End Program

Lasso
or or simply

'Hello, world!';

Lexico Mobile (in Spanish)
tarea muestre "Hola mundo !"

or

clase Saludo derivada_de Form publicos mensajes Saludo copie "Hola mundo !" en saludo.Text

Linden Scripting Language
Linden Scripting Language is the scripting language used within Second Life

Linotte
Livre : HelloWorld Paragraphe : Affichage Actions : "Hello, World !" !

Lisp
Lisp has many dialects that have appeared over its almost fifty-year history.

Common Lisp
or

or in the REPL:

(As a string (enclosed in quotes) it evaluates to itself, so is printed.)

Emacs Lisp
or:

Logo
print [Hello, world!] or pr [Hello, world!]

In MSWLogo only

messagebox [Hi] [Hello, world!]

Lua
or or

M (MUMPS)
W "Hello, world!"

Maple
print("Hello, world!");

Mathematica
or simply: "Hello, world!"

MATLAB / GNU Octave
or or with a GUI or

Maude
fmod HELLOWORLD is protecting STRING. op helloworld : -> String. eq helloworld = "Hello, world!" . endfm red helloworld.

Max
max v2;
 * 1) N vpatcher 10 59 610 459;
 * 2) P message 33 93 63 196617 Hello, world!!;
 * 3) P newex 33 73 45 196617 loadbang;
 * 4) P newex 33 111 31 196617 print;
 * 5) P connect 1 0 2 0;
 * 6) P connect 2 0 0 0;
 * 7) P pop;

Mesham
var x:String::allocated[on[0]]; x:="Hello World"; // allocated on process 0 only proc 1 { // This is displayed by process 1, auto communication done to achieve this print[x]; }

M4
Hello, world!

Model 204
BEGIN PRINT 'Hello, world!' END

MOO
This requires that you be the player or a wizard: This is specific to the implementation of the core used for the moo, but works on most well known moos, such as LambdaCore or JH-Core:

Mouse
"Hello, World!" $

Script
main(std:string >>arg<< / OS.GetArg) {     std:stream >>CONSOLE<< / OS.Console; CONSOLE:Write([byte]{0048, 0065, 006C, 006C, 006F, 002C, 0058, 006F, 0072, 006C, 0064}); //                   H     e     l     l     o    ,     W     o     r     l     d   // }

Command WI

 * 1) # DEFINE g >>CONSOLE<< / OS.Console
 * 2) % proc CONSOLE:Write([byte]{0048, 0065, 006C, 006C, 006F, 002C, 0058, 006F, 0072, 006C, 0064})

Command WoI

 * 1) @ Write([byte]{0048, 0065, 006C, 006C, 006F, 002C, 0058, 006F, 0072, 006C, 0064})

MS-DOS batch
''(with the standard command.com interpreter. The @ symbol is optional and prevents the system from repeating the command before executing it. The @ symbol must be omitted on versions of MS-DOS prior to 3.0.). It's very common for batchfiles to start with two lines of "@echo off" and "cls".''  For MS-DOS 3.0 or lower

MUF
me @ "Hello, world!" notify ;

Natural
WRITE 'Hello, world!' END

or

WRITE 'Hello, world!'.

Neko
$print("Hello, world!!\n");

Nemerle
The easiest way to get Nemerle print "Hello, world!" would be that: however, in bigger applications the following code would be probably more useful:

Nim
or

Oberon
Oberon is both the name of a programming language and an operating system.

Program written for the Oberon operating system:

Freestanding Oberon program using the standard Oakwood library:

Obix
system.console.write_line ( "Hello, world!" )

ObjectGears
Message to the user in the form: OGForm.SetInfo('Hello world!');

Entry into the log: OG.Log.Write('Hello world!');

occam
PROC hello.world(CHAN OF BYTE screen!) out.string("Hello, world!*n", 0, screen!) :
 * 1) USE "course.lib"

or without using course.lib

PROC hello.world(CHAN OF BYTE screen!) SEQ screen ! 'H'    screen ! 'e'    screen ! 'l'    screen ! 'l'    screen ! 'o'    screen ! ','    screen ! ' '    screen ! 'w'    screen ! 'o'    screen ! 'r'    screen ! 'l'    screen ! 'd'    screen ! '!'    screen ! '*n' :

OpenScript
-- in a popup window request "Hello world"

OPL
See also GUI section.

PROC hello: PRINT "Hello, world!" ENDP

OPS83
module hello (main) { procedure main {      write |Hello, world!|, '\n'; }; };

PAWN
main { print ( "Hello, World!" ); } or

main { new string[ 14 ]; format string( sizeof (string), "Hello, World! );    print (string); }

As PL file
(the semicolon is optional)

or

PHP
PHP is a templating language and will echo any text not within PHP tags directly, so the simplest form is: Using actual PHP statements, it can be written: or use short-hand echoing, syntaxed as such: this will also work:

PILOT
T:Hello, world!

PostScript
See also page description language section.

PowerShell
or or or or

Processing
println("Hello, world!");

Pure Data

 * 1) N canvas 0 0 300 300 10;
 * 2) X obj 100 100 loadbang;
 * 3) X msg 100 150 Hello, world!;
 * 4) X obj 100 200 print;
 * 5) X connect 0 0 1 0;
 * 6) X connect 1 0 2 0;

Python 3
This also works on Python 2.4 or later, but in an unintuitive way. In Python 3, it calls the  function with the string. In Python 2, it executes the  statement with the expression , which evaluates to the string.

Any Python version
In Python 2.6 or later:

In the REPL
'Hello, world!' (with quotation marks) can be attained through:

Flask
As Python's Flask web microframework

Raku
or or

Rebol
See also GUI section.

print "Hello, world!"

Red
See also GUI section.

print "Hello, world!"

REFAL
$ENTRY GO{=;}

Revolution
(This works the same for Transcript or xTalk)

Printed in the message box
put "Hello, World!"

Shown within a dialog box
answer "Hello, world!"

As CGI file

 * 1) !revolution

on startup put "Content-Type: text/plain" & cr & cr  put "Hello World!" end startup

Free-Form Syntax
/FREE DSPLY 'Hello, world!'; *InLR = *On; /END-FREE

Traditional Syntax
With this syntax, a constant has to be used because the message must be placed in positions 12 to 25, between apostrophes.

d TestMessage    c                   Const( 'Hello, world!' ) c    TestMessage   DSPLY c                  EVAL      *InLR = *On

Message Window
Using the internal message window, a simple Hello, world! program can be rendered thus:

mwin("Hello, world!") wait

On Screen Text
An additional way to render text is by using the built in text function.

text(1,1,"Hello, world!") wait

RPL
See also GUI section.

(On Hewlett-Packard HP-28, HP-48 and HP-49 series graphing calculators.)

<<  CLLCD "Hello, world!" 1 DISP 0 WAIT DROP >>

RT Assembler
_name  Hello~World! pause  Hello~World! exit _end

Ruby
See also GUI section. or or

S (and R)
or

S-Lang
message("Hello, world!");

Sather
class HELLO_WORLD is  main is     #OUT+"Hello, world!\n"; end; end;

Scala
App was introduced since Scala 2.1, and Application was deprecated since Scala 2.9.0. Use Application instead of App for versions below 2.1.

sed
(Note: requires at least one line of input)

Seed7
$ include "seed7_05.s7i";

const proc: main is func begin writeln("Hello, world"); end func;

Self
'Hello, world!' print.

sense script
out('Hello, world!');

ShadowScript
'set up initial variables struct.follow {  cpu.fan.speed(500.rpm) cpu.max.process(100) } < logic.handle(0) int main int var array.max(100000000) > 'open and write the text in a free handle window open mainwin(io ) as free(1) {  write.free(1).("Hello",&sym," world",&sym)(&sym<",">&sym<"!">   apply.free(1) to text  } 'reset the fan, cpu, and vars <  logic(std)  fan(std.auto)  cpu.max(auto)  unint main  unint var  un.array.max(std) > 'end end .end/

Simula
BEGIN OutText("Hello, world!"); OutImage; END

Smalltalk
alternative:

Span
class Hello { static public main: args { Console << "Hello, world!\n"; } }

Spin
Spin is the high level language from Parallax Inc. used to program their Propeller multi-core micro-controllers.

The program assumes that the software UART object, provided with the Propeller IDE, is used to deliver the message over a serial line.

CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ console : "FullDuplexSerial" PUB start console.start(31, 30, 0, 115_200) console.str(string("Hello, world!", 13))

SPSS Syntax
ECHO "Hello, world!".

SSPL
1.0 print Hello, World! end

SQL
or (for EnterpriseDB's Stored Procedure Language (SPL))

or (e.g. Oracle dialect)

or (for Oracle's PL/SQL proprietary procedural language)

or (e.g. MySQL or PostgreSQL dialect)

or (for PostgreSQL's PL/pgSQL Procedural language)

or (e.g. T-SQL dialect)

or (for KB-SQL dialect)

STARLET
RACINE: HELLO_WORLD. NOTIONS: HELLO_WORLD : ecrire("Hello, world!").

Stata
Define program in script (.do-file) or at command line: Or, interactively at the command line:

di "Hello, world!"

SuperCollider
or, for interactive prompt,

"Hello, world!"

Supernova
I want window and the window title is hello world.

TACL

 * 1) OUTPUT Hello, world!

Tcl (Tool command language)
See also GUI section.

Template Toolkit
[% GET "Hola mundo!"; %]

Or the English version:

[% GET "Hello world!"; %]

TSQL
or, simpler variations:

TTCN-3
module hello_world { control { log("Hello, world!"); } }

Turing
put "Hello world!"

UNIX-style shell
or using an inline 'here document' or or for a curses interface:

Verilog
or (a little more complicated)

Visual Basic Script
OR as a VBscript file

X#
sub:main load:mscorlib.dll push:Hello, World! invoke:mscorlib.dll:System.Console:Write:1 endsub

XC
XC is a C like language from XMOS Ltd offering features supporting Communicating Sequential Processes on their multi-threaded, multi-core processors. This example shows some of those features.

XL
use XL.UI.CONSOLE WriteLn "Hello, world!"

or

import IO = XL.UI.CONSOLE IO.WriteLn "Hello, world!"

XMLmosaic
  1  

Yorick
write, "Hello, world!";

Note: The semicolon is optional.

Zdzich
Programming language with commands in Polish. Webpage

boo
Functional equivalent of C# program below.

C#
Simply, using Message Box:

Or:

Clarion
The simplest way to achieve this is with the built in message function that is similar to the windows messageBox.

PROGRAM MAP END CODE MESSAGE('Hello, world!!','Clarion') RETURN

A more real world example uses a Clarion structure to declare a window and the Clarion Accept loop to process events from that window.

PROGRAM MAP HelloProcedure PROCEDURE END CODE HelloProcedure RETURN HelloProcedure PROCEDURE Window WINDOW('Clarion for Windows'),AT(,,222,116),FONT('Tahoma',8,,FONT:regular),ICON('Hey.ICO'), | SYSTEM,GRAY STRING('Hello, world!!'),AT(91,22),USE(?String1) BUTTON('Close'),AT(92,78,37,14),USE(?CloseBtn),LEFT END CODE OPEN(Window) ACCEPT CASE ACCEPTED OF ?CloseBtn POST(EVENT:CloseWindow) END END CLOSE(Window) RETURN

Curl
{curl 3.0, 4.0 applet} {curl-file-attributes character-encoding = "utf-8"} Hello, world!

Delphi, Kylix
or

Erlang
One way of invoking this would be to enter hello_world:hello. in the Erlang shell; another would be to run from a command line:

erl -noshell -run hello_world hello -run init stop

Euphoria
MS-Windows only - basic. MS-Windows only - using Win32Lib library

F#
Using WindowsForms, at the F# interactive prompt:

G (LabVIEW)
PUBLIC SUB Main Message.Info("Hello, world!") END

K
This creates a window labeled "Hello, world!" with a button labeled "Hello, world!".

NSIS
This creates a message box saying "Hello, world!".

OCaml
 Uses lablgtk 

OPL
(On Psion Series 3 and later compatible PDAs.)

PROC guihello: ALERT("Hello, world!","","Exit") ENDP

or

PROC hello: dINIT "Window Title" dTEXT "","Hello, world!" dBUTTONS "OK",13 DIALOG ENDP

Pure Data
Patch as ASCII-art: [Hello, world!( | [print] Patch as sourcecode:
 * 1) N canvas 0 0 300 300 10;
 * 2) X msg 100 150 Hello, world!;
 * 3) X obj 100 200 print;
 * 4) X connect 0 0 1 0;

Tkinter
Using PyQt:

Kivy
Kivy multi-platform framework

Qt toolkit (in C++)
or or

Robotic (MegaZeux)
* "Hello, world!" end

RPL
(On Hewlett-Packard HP-48G and HP-49G series calculators.)

<< "Hello, world!" MSGBOX >>

RTML
Hello TEXT "Hello, world!"

Smalltalk
Evaluate in a workspace:

Using the Morphic GUI toolkit of Squeak Smalltalk:

Using wxSqueak:

Tk
label .l -text "Hello, world!" pack .l

and the same in one line

pack [label .l -text "Hello, world!"]

Tcl with Tk
or

Ubercode
Ubercode 1 class Hello public function main code call Msgbox("Hello", "Hello, world!") end function end class

Uniface
message "Hello, world!"

Visual Basic .NET 2003/2005
Note that the previous example will only work when the code is entered as part of a Form Load Event, such as the one created by default when generating a new project in the Visual Studio programming environment. Equivalently, the following code is roughly equivalent to the traditional Visual Basic 6 code by disabling the Application Framework and setting 'Sub Main' as the entry point for the application: or using a class;

Windows API (in C)
This uses the Windows API to create a full window containing the text.

Xojo
In the Open event handler of the default window:

ASCII
The following sequence of characters, expressed in hexadecimal notation (with carriage return and newline characters at end of sequence): 48 65 6C 6C 6F 2C 20 77 6F 72 6C 64 21 0D 0A

The following sequence of characters, expressed as binary numbers (with cr/nl as above, and the same ordering of bytes): 00-07: 01001000 01100101 01101100 01101100 01101111 00101100 00100000 01110111 08-0E: 01101111 01110010 01101100 01100100 00100001 00001101 00001010

XHTML 1.1
(Using UTF-8 character set.)

Informal
The &lt;html&gt; and &lt;body&gt; tags are not necessary for informal testing. Simply write it as text without tags.

HTML 4.01 Strict (full)
The first paragraph of the W3C Recommendation on The global structure of an HTML document also features this example.

HTML 4.01 Strict (smallest)
This is the smallest legal version, leaving out all optional tags

Markdown
Hello, World!

MediaWiki/Wikitext
Hello, World!

PDF
%PDF-1.0 1 0 obj << /Type /Catalog /Pages 3 0 R /Outlines 2 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Count 1 /Kids [4 0 R] >> endobj 4 0 obj << /Type /Page /Parent 3 0 R /Resources << /Font << /F1 7 0 R >>/ProcSet 6 0 R >> /MediaBox [0 0 612 792] /Contents 5 0 R >> endobj 5 0 obj << /Length 44 >> stream BT /F1 24 TF 100 100 Td (Hello, world!) Tj ET endstream endobj 6 0 obj [/PDF /Text] endobj 7 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /MacRomanEncoding >> endobj xref 0 8 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000179 00000 n 0000000322 00000 n 0000000415 00000 n 0000000445 00000 n trailer << /Size 8 /Root 1 0 R >> startxref 553 %%EOF

This is a valid PDF only if the text file has CRLF line endings.

RTF
{\rtf1\ansi\deff0 {\fonttbl {\f0 Courier New; }} \f0\fs20 Hello, world! }

AviSynth
(Creates a video with default properties)

Lingo (Macromedia Director scripting language)
on exitFrame me  put "Hello, world!" end

Outputs the string to the message window if placed in a single movie frame. Alternatively, to display an alert box stating the message you could use

on exitFrame me  alert "Hello, world!" end

Esoteric programming languages
This page shows the Hello, world! program in esoteric programming languages — that is, working programming languages that were designed as experiments or jokes and were not intended for serious use.

0815
<:48:x<:65:=<:6C:$=$=$$~<:03:+$<:2c:~$~<:c:x-$<:77: ~$~<:8:x-$~<:03:+$~<:06:x-$x<:0e:x-$=x<:43:x-$

Arrow
■→→■↓■←■←■↓■→→■ /* makes H */ →→■↓■↑↑↑■       /* makes I */

Binary lambda calculus
As documented at http://www.ioccc.org/2012/tromp/hint.html (any of the 16 ASCII characters from ' ' to '/' can be used at the start) !Hello, world

BlooP, FlooP
From Eric Raymond's interpreter package (changed to use upper case as in the book). DEFINE PROCEDURE HELLO-WORLD [N]: BLOCK 0: BEGIN PRINT['Hello, world!']; BLOCK 0: END.

Chef
[http://www.dangermouse.net/esoteric/chef_hello.html Hello, world! Souffle] by David Morgan-Mar. Hello World Souffle. This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person. 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.

Later Mike Worth wrote tastier and actually functional recipe.

Hello World Cake with Chocolate sauce. This prints hello world, while being tastier than Hello World Souffle. The main chef makes a " world!" cake, which he puts in the baking dish. When he gets the sous chef to make the "Hello" chocolate sauce, it gets put into the baking dish and then the whole thing is printed when he refrigerates the sauce. When actually cooking, I'm interpreting the chocolate sauce baking dish to be separate from the cake one and Liquify to mean either melt or blend depending on context. Ingredients. 33 g chocolate chips 100 g butter 54 ml double cream 2 pinches baking powder 114 g sugar 111 ml beaten eggs 119 g flour 32 g cocoa powder 0 g cake mixture Cooking time: 25 minutes. Pre-heat oven to 180 degrees Celsius. Method. Put chocolate chips into the mixing bowl. Put butter into the mixing bowl. Put sugar into the mixing bowl. Put beaten eggs into the mixing bowl. Put flour into the mixing bowl. Put baking powder into the mixing bowl. Put cocoa powder into the mixing bowl. Stir the mixing bowl for 1 minute. Combine double cream into the mixing bowl. Stir the mixing bowl for 4 minutes. Liquify the contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish. bake the cake mixture. Wait until baked. Serve with chocolate sauce. chocolate sauce. Ingredients. 111 g sugar 108 ml hot water 108 ml heated double cream 101 g dark chocolate 72 g milk chocolate Method. Clean the mixing bowl. Put sugar into the mixing bowl. Put hot water into the mixing bowl. Put heated double cream into the mixing bowl. dissolve the sugar. agitate the sugar until dissolved. Liquify the dark chocolate. Put dark chocolate into the mixing bowl. Liquify the milk chocolate. Put milk chocolate into the mixing bowl. Liquify contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish. Refrigerate for 1 hour.

False
"Hello, World! "

The newline before the terminating quote mark is necessary.

HQ9+
H

LOLGraphics
HAI 3.4 0 100 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ PRINT TEXT HELLO WORLD! IM OUTTA UR CODE

Malbolge programming language
(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z ] KwZY44Eq0/{mlk**hKs_dG5 [ m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O< hello

P programming language
"Hello, world!\n"

Perl
Not really an esoteric language, but this code uses obfuscation:

Piet
Piet programming language uses only colors.

SNUSP
/e+++++++++++++++++++++++++++++.\ ./\/\/\ /+++\!>.+++o.l.+++++++l/                  #/?\ $H!\++++++\ +  \comma. .+.!\-/ \!\/\/\/\/ \++++++++++/

Modular SNUSP:

/@@@@++++#              #+++@@\                #-@@@\n $@\H.@/e.+++++++l.l.+++o.>>++++.< .<@/w.@\o.+++r.++@\l.@\d.>+.@/.# \@@@@=>++++>+++++<<@+++++#      #---@@/!=========/!==/

Spoon (programming language)
1111110010001011111111111101100000110100010100101111111111001000101111111111011000001101 0100101011111110010100010101110010100101111001000101111111111101100000110100010100111110 0100010000000000000011000001101000101001101101101101111100100010111110110000011010001010 0100100010101110010100000000000000000000010100000000000000000000000000010100100101001010

Super NAND Time!!
12 (32 35 37 38 42) 13 (35 37 38 39 43) 14 ((31 36 39 42 43)) 15 (31 33 34 35 38 40 43) 16 (37 39) 17 ((31 43)) 18 ((36 42 43)) 20 ((42(43))) 21 44 31 ((31)(44)) 32 (32(31)) 33 (33(32)) 34 (34(33)) 35 (35(34)) 36 (36(35)) 37 (37(36)) 38 (38(37)) 39 (39(38)) 40 (40(39)) 41 (41(40)) 42 (42(41)) 43 (43(42)) 44 1

Taxi programming language
"Hello, World!" is waiting at the Writer's Depot. Go to Writer's Depot: west 1st left, 2nd right, 1st left, 2nd left. Pickup a passenger going to the Post Office. Go to the Post Office: north 1st right, 2nd right, 1st left. Go to the Taxi Garage: north 1st right, 1st left, 1st right.

T programming language
%begin @jump $main %main.0 @echo %msg %main.1 @end %main.count 2 %msg Hello, world!

This=That
x=Hello,world! x=print

Unlambda programming language
`r```````````.H.e.l.l.o. .w.o.r.l.di

Var'aq programming language
Note: actually prints "What do you want, universe?" in Klingon.

~ nuqneH { ~ 'u' ~ nuqneH disp disp } name nuqneH

Whitespace
Note that whitespace has been highlighted ( Space, Tab )

&#32;&#32;&#32; &#32;&#32;&#32; &#9; &#32;&#32; &#9; &#32;&#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;  &#32;&#32;&#32; &#9;&#9; &#32;&#32; &#9; &#32; &#9;  &#9;&#9; &#32;&#32;&#32;&#32; &#9; &#32;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;&#9; &#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;&#9; &#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32;  &#9; &#32;&#32;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;&#9;&#9;&#9;  &#9;&#9; &#32;&#32;&#32;&#32; &#9; &#32; &#9;  &#32;&#32;&#32; &#9; &#32; &#9;&#9; &#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9; &#32;  &#32;&#32;&#32; &#9; &#32;&#32;&#32;&#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9;&#9;  &#32;&#32;&#32; &#9;&#9;&#9; &#32; &#9;&#9;&#9;  &#9;&#9; &#32;&#32;  &#32;&#32; &#9; &#32;&#32;&#32;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;&#9;&#9;&#9;  &#9;&#9; &#32;&#32;&#32;&#32; &#9; &#32;&#32; &#9;  &#32;&#32;&#32; &#9;&#9;&#9; &#32;&#32; &#9; &#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9; &#32; &#9; &#32;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;&#9; &#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9; &#32; &#9;&#9;  &#32;&#32;&#32; &#9;&#9; &#32;&#32;  &#9; &#32;&#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9; &#32;&#32;  &#32;&#32;&#32; &#9; &#32;&#32;&#32;&#32; &#9;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9; &#32; &#9;  &#32;&#32;&#32; &#9;&#9; &#32; &#9;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9;&#9; &#32;  &#32;&#32;&#32; &#9; &#32; &#9; &#32;  &#9;&#9; &#32;&#32;&#32;&#32; &#9;&#9;&#9;&#9;  &#32;&#32;&#32;&#32;  &#9;  &#9; &#32;&#32;&#32;&#32;&#32;  empty-line &#32;&#32;&#32;&#32; &#9; empty-line &#32; &#9;&#9;&#9; &#32; empty-line &#9; &#32;&#32; &#9; &#32; &#9;  &#32;&#32;&#32;&#32;&#32; &#9;  &#9; &#32;&#32;&#32;  empty-line &#32;&#32; &#9; empty-line &#32;&#32;&#32; &#9; &#32; empty-line empty-line/EOF

XS programming language
Hello, world!

DUNNBOL1
A code language that draws in binary on a braille plotter.

BGN GRPLOT BIN DRAWPLOT 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0011100111001111111001110000000011100000000001111100000000001000001000011111000001111100000100000000011111110000 0001000010000100001000100000000001000000000010000010000000001000001000100000100010000010000100000000010000001000 0001000010000100000000100000000001000000000010000010000000001000001000100000100010000010000100000000010000001000 0001111110000111100000100000000001000000000010000010000000001001001000100000100011111110000100000000010000001000 0001000010000100000000100000000001000000000010000010000000001011101000100000100010000001000100000000010000001000 0001000010000100001000100000000001000000000010000010000000001100011000100000100010000000100100000000010000001000 0011100111001111111001111111100011111111000001111100000000001000001000011111000010000000100111111100011111110000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ENDDRAW END

SM
The OO language looks like C.

Skript+
Copy this and paste in ChatGPT, on a new chat: Output: Hello, world! A longer version, which still prints "Hello, world!": CreateBuf: $Hello$ $Hello$: { [H] [e] [l] [l] [o] [,] [32] @ The ASCII value for space [w] [o] [r] [l] [d] [!] } OpenBuf: $Hello$ JoinAllChars: $Hello$ => $Hello2$ Output: $Hello2$ CloseBuf: $Hello$ Note: The first method is tested and it's working. I don't know about the second one!