syntax highlighted hello worlds


references

The Hello World Collection

the hello.c

See Hello world program in Wikipedia.

#include <stdio.h>

main()
{
    printf("hello, world\n");
}

actionscript3

// Hello World in ActionScript 3. Place code in the first frame Actions.
var t:TextField=new TextField();
t.text="Hello World!";
addChild(t);

bash

#!/bin/bash
echo "hello, world"

clojure

coldfusion

<!---Hello world in ColdFusion--->

<cfset message = "Hello World">
<cfoutput> #message#</cfoutput>

cpp

#include <iostream>

void main()
{
    std::cout << "hello, world" << std::endl;
}

csharp

public class Hello
{
    public static void Main()
    {
        System.Console.WriteLine("hello, world");
    }
}

css

/* Hello World in CSS */
body:before {
    content: "Hello World";
}

delphi

{$APPTYPE CONSOLE}
program p;
begin
  Writeln ('Hello, World');
end.

erlang

-module(hello).
-export([start/0]).
start() -> io:fwrite("hello, world\n");

fsharp

diff

groovy

html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <body>
    <p>hello, world</p>
  </body>
</html>
<!DOCTYPE html>
<html>
  <body>
    <p>hello, world</p>
  </body>
</html>

javascript

java

public class Hello {

    public static void main(final String[] args) {
        System.out.println("hello, world");
    }
}

javafx

matlab (keywords only)

objc

#import <stdio.h>

int main( int argc, const char *argv[] ) {
    printf( "hello world\n" );
    return 0;
}

perl

#!/usr/bin/perl

use strict;
use warnings;

print "hello, world\n";

php

<?php
    echo "hello, world";
?>

text

hello, world

powershell

python

r

ruby

#!/usr/bin/ruby

print "hello, world\n"

scala

object Hello {
    def main(args : Array[String]) {
        println("hello, world");
    }
}
object HelloApp extends App {
    println("hello, world");
}

sql

vb

xml

<?xml version="1.0" encoding="UTF-8"?>
<root>hello, world</root>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s