"Hello, World!" in 66 Programming Languages
"Hello, World!" in 66 Programming Languages
* ABAP: "Hello, world!" * ABAP // Dylan: "Hello, world!" Dylan @ECHO OFF MS-DOS Batch
REPORT HELLO_WORLD. define method hello-world() REM DOS batch: "Hello, world!"
WRITE 'Hello, world!'. format-out("Hello, world!\n"); ECHO Hello, world!
end method hello-world;
hello-world();
-- Ada: "Hello, world!" Ada ; Mumps-M: "Hello, world!" Mumps-M
with Ada.Text_IO; use Ada.Text_IO; w !,"Hello, world!"
procedure Hello is // ECMAScript/JavaScript: "Hello, world!" ECMA/JavaScript
begin alert('Hello, world!');
Put_Line ("Hello, world!"); (* Oberon: "Hello, world!" *) Oberon
end Hello; MODULE Helloworld;
indexing Eiffel IMPORT Write;
description: "Eiffel: Hello, world!" BEGIN
HELLO: 'BEGIN' ALGOL class HELLO Write.Line("Hello, world!");
'COMMENT' CDC ALGOL 60: "Hello, world!" ; creation END Helloworld.
OUTSTRING(1, 'Hello, world!') run
'END' HELLO feature
run is program HelloWorld(output); Pascal
do (* Pascal: Hello, world! *)
<!-- Ant: "Hello, world!" --> Ant print("Hello, world!%N"); begin
<project name="Hello" default="hello"> end -- run WriteLn('Hello, world!');
<target name="hello" description="Greeting"> end -- HELLO end.
<echo message="Hello, world!"/>
</target>
</project> %% Erlang: "Hello, world!" Erlang # Perl: "Hello, world!" Perl
-module(hello). print "Hello, world!\n";
-export([hello/0]).
X APL: Hello, world! APL
Y- 'Hello, world!' hello() -> <?php // PHP: "Hello, world!" PHP
io:format("Hello, world!~n", []). echo "<html><body>"."Hello, world!"."</body></html>"; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> HTML # Ruby: "Hello, world!" Ruby
10 REM BASIC: "Hello, world!" BASIC <!-- HTML: "Hello, world!" --> puts "Hello, world!"
20 PRINT "Hello, world!" <html><head><title>Greeting</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><body><p>Hello, World!</p></body></html> ;;; Scheme: "Hello, world!" Scheme
Brainfuck: "HelloKOMMA World!" [-]++++++++++[>++++++ Brainfuck (define h(lambda()(display "\nHello, world!")(newline)()))(h)
+>++++++++++>++++>+++>+<<<<<-]>++.>+.+++++++..+++.>+
+++.>++.<<++++++++.--------.+++.------.--------.>>+. * INTERCAL: "Hello, world!" INTERCAL
PLEASE DO ,1 <- #13 DO ,1 SUB #9 <- #168 echo s | sed -ne '1s/.*/Hello, world!/p' sed
DO ,1 SUB #1 <- #238 DO ,1 SUB #10 <- #24
/BEGIN-PROCEDURE LOGGING=N BS2000 DO ,1 SUB #2 <- #112 DO ,1 SUB #11 <- #16
/REMARK BS2000 (SDF): "Hello, world!"
/ASSIGN-SYSDTA TO-FILE=*SYSCMD
DO ,1 SUB #3 <- #112 DO ,1 SUB #12 <- #158
'Hello, world!' print. Self
DO ,1 SUB #4 <- #0 DO ,1 SUB #13 <- #52
/WRITE-TEXT 'Hello, world!' DO ,1 SUB #5 <- #64 DO READ OUT ,1
/SET-JOB-STEP DO ,1 SUB #6 <- #238 PLEASE GIVE UP
/ASSIGN-SYSDTA TO-FILE=*PRIMARY DO ,1 SUB #7 <- #26 ! Simula: "Hello, world!" ; Simula
/END-PROCEDURE DO ,1 SUB #8 <- #248 Begin
OutText("Hello, world!"); OutImage;
End of program;
/* ANSI C: "Hello, world!" */ C // Java: "Hello, world!" Java
#include <stdio.h>
#include <stdlib.h> class HelloWorld { 'Hello, world!' out. Smalltalk
int main(void){ public static void main(String args[]) {
puts("Hello, world!"); return EXIT_SUCCESS; System.out.println("Hello, world!");
} } -- SQL: "Hello, world!" SQL
TEX
} SELECT 'Hello, world!' AS message;
10623 Berlin 12489 Berlin 79098 Freiburg 20095 Hamburg 04109 Leipzig 93053 Regensburg 89081 Ulm Portofreie Lieferung
Hardenbergstr. 5 Rudower Chaussee 26 Friedrichring 25 Kurze Mühren 6 Grimmaische Str. 10 Universitätsstraße 31 Albert-Einstein-Allee 15 innerhalb Deutschland
Tel 030/617911-0 Tel 030/2093-2028 Tel 0761/3899010 Tel 040/336384 Tel 0341-3397500-0 Tel 0941/90830 Tel 0731/56600 Kostenlose Service Hotline
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 0800-2662665 (COMBOOK)
10117 Berlin 91054 Erlangen 06108 Halle 50937 Köln 35037 Marburg 89073 Ulm siz - Service Internationale Email Newsletter
Friedrichstraße 128 Universitätsstraße 6 Universitätsring 7 Universitätsstr. 20 Steinweg 35 a Wengengasse 27 Zeitschriften 24 Themen Ihrer Wahl
Tel 030/2827079 Tel 09131/829644 Tel 0345/212150 Tel 0221/428153 Tel 06421/590120 Tel 0731/63334 Tel 0800/7492665 Subscribe/Unsubscribe unter:
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] www.lehmanns.de/email-news