How To: Write a Hello World program in 366 programming languages [How To]

How To I Heart Tech

472097903_b781a0f4f8.jpg

One of the very first thing everyone does when learning a programming language is the “Hello World” program– that is, a very short (usually) bit of code that produces a written output when run.  It could say “God is dead” or “Smoke ‘em if you’ve got ‘em”, but it’s tradition for it to be “Hello World”, though traditions are made to be broken.

All of this just gives you the most basic of understandings of how the language looks and how it’s constructed.  Baby steps.  Baby steps.

Here we have a list of how to write a simple Hello World program in 366 different programming languages.  So in case you’re having the conversation one day and you can say yeah sure I can write a Hello World in Perl:

# Hello world in perlprint “Hello World!\n”;

Or PHP:

<?php  // Hello World in PHP

echo ‘Hello World!’;

?>

Or Java Mobile:

// Hello World on a mobile Java devicepackage helloworld;

import javax.microedition.midlet.*;

import javax.microedition.lcdui.*;

public class HelloWorld extends MIDlet {

public HelloWorld()

  {

    Form form = new Form(”Hello World”);

    form.append(”Hello world!”);

    Display.getDisplay(this).setCurrent(form);

  }

protected void pauseApp() {  }

  protected void startApp() throws

    javax.microedition.midlet.MIDletStateChangeException {  }

  protected void destroyApp(boolean parm1) throws

    javax.microedition.midlet.MIDletStateChangeException {  }

}

See? You can just feel the uber coolness oozing out already.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Fark
  • Technorati
  • YahooMyWeb
  • Furl
  • Reddit
  • StumbleUpon

Email This Post Email This Post Print This Post Print This Post

Post a Response