101 ways to say ‘Hello World!’

OK… that was just a catchy title. I actually know only 25 languages to say Hello World.

Programming matters ...

Bourbon jackDaniels = new Bourbon () ;
if (jackDaniels. Empty)
{
   jackDaniels. Refill () ;
else
{
   jackDaniels.Drink () ;
}

1 – COBOL (aka my first love!)


IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO WORLD.
AUTHOR. NICK DORALP.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
START-PGM.
    DISPLAY "HELLO WORLD!" UPON CONSOLE.
    STOP RUN.

2- FORTRAN 2

     C -- BY NICK DORALLP
PRINT *,"HELLO WORLD!"

3- FORTRAN IV (my second first love!)

      C -- BY NICK DORALP
WRITE(4,10)
10 FORMAT(' HELLO WORLD!');
END


4- ASSEMBLER 370 (OK.. this is my favorite love!)

5- C (how can I not love this one)


int main() {
    printf("Hello, World!")
    return 0;
}

6 – C++


int main() {
    std::cout << "Hello World!";
    return 0;
}


7- BASIC


10 PRINT "Hello World!"
20 GOTO 10

8- VISUAL BASIC (VB)


Imports System

Module Module1
   Sub Main()
     Console.WriteLine("Hello World!")
   End Sub
End Module

9- PERL


#!/usr/bin/perl 

# Modules used 
use strict; 
use warnings; 

# Print function 
print("Hello World\n"); 

10- Python


# This program prints Hello, world!
# By Nick Doralp

print('Hello, world!')

11- REXX


/* 
Sample REXX Program 
by Nick Doralp
*/

SAY 'Hello world!'

12- Flutter / Dart (these days we are really hanging out together)


import 'package:flutter/material.dart';

void main() {
runApp(const NicksHelloWorld());
}

class NicksHelloWorld extends StatelessWidget {
const NicksHelloWorld({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
	// Material App
	return MaterialApp(

		// Scaffold Widget
		home: Scaffold(
	appBar: AppBar(
		// AppBar takes a Text Widget
		// in it's title parameter
		title: const Text('Hello World Example'),
	),
	body: const Center(child: Text('Hello World')),
	));
}
}

13- SwiftUI


import SwiftUI
struct ContentView: View {
    var body: some View {
        Text("Hello, World!")
    }
}
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

14- ALGOL


// the main program (this is a comment)

BEGIN
FILE F (KIND=REMOTE);
EBCDIC ARRAY E [0:11];
REPLACE E BY "HELLO WORLD!";
WHILE TRUE DO
  BEGIN
  WRITE (F, *, E);
  END;
END.

15- PL/1


HELLO:   PROCEDURE OPTIONS (MAIN);

             /* A PROGRAM TO OUTPUT HELLO WORLD */
             FLAG = 0;

LOOP:     DO WHILE (FLAG = 0);        
             PUT SKIP DATA('HELLO WORLD!');
          END LOOP;

END HELLO;

16- HTML


<HTML>
<HEAD>
<TITLE>Hello World Example</TITLE>
</HEAD>
<BODY>
<CENTER><H1>Hello World!</H1></CENTER>
</BODY>
</HTML>

17- Java


class HelloWorld {
    public static void main(String args[])
    {
        System.out.println("Hello world!");
    }
}

18- Javascript


<HTML>
<HEAD>
    <META charset="UTF-8">
    <META name="viewport" content="width=device-width, initial-scale=1.0">
    <META name="author" content="Nick Doralp > ndoralp@gmail.com">
    <TITLE>Hello World With JavaScript</TITLE>
</HEAD>
<BODY>
<CENTER>
	<FORM Name="Form1" ACTION="">
	<INPUT TYPE=BUTTON VALUE="Click me" NAME="BtnHello" OnClick="Hello()">
	</FORM>

</CENTER>

<SCRIPT LANGUAGE="JavaScript">
<!--

    function Hello ()
    {
        alert("Hello World!")
    }

//-->
<SCRIPT>

</BODY>
</HTML>

19- Google Apps Scripts (I have only nice things to say about you!)


function HelloWorld() {   var msg = "Hello World!";
   console.log(msg);
}

20- Kotlin


// Hello World Example

fun main(args : Array<String>) {
    println("Hello, World!")
}

21- Assembler x86 (for PC)


Asm 8086

; "Hello, World!" Example

name "hello"
org 100h
jmp start       ; skip data declaration
msg:    db      "Hello, World!", 0Dh,0Ah, 24h
start:  mov     dx, msg  ; 
        mov     ah, 09h  ; print function is 9.
        int     21h      ; do it!
        mov     ah, 0 
        int     16h      ; wait for any key....
ret ; return to operating system.




22- Univac 1100 (we had good times together)


https://www.fourmilab.ch/documents/univac/manuals/pdf/Software/UP-4040r2.pdf

23- PHP (what would I do without you!)


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="Nick Doralp > ndoralp@gmail.com">
    <title>PHP - Hello, World!</title>
</head>
<body>
        <h1><?php echo 'Hello, World!'; ?></h1>
</body>
</html>
Code language: PHP (php)

24- RPG-IV


**free 
dsply 'Hello World'; 
return;

25- Pascal


program Hello;
begin
  writeln ('Hello, world.');
end.