Skip to content

Commit

Permalink
Add some hello programms examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius786 committed Aug 29, 2014
1 parent e9b3121 commit eb5d8e3
Show file tree
Hide file tree
Showing 38 changed files with 224 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hello.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REPORT TEST.
WRITE 'Hello World'.
8 changes: 8 additions & 0 deletions hello.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Hello World in Ada

with Text_IO;
procedure Hello_World is

begin
Text_IO.Put_Line("Hello World!");
end Hello_World;
5 changes: 5 additions & 0 deletions hello.as.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Hello World in ActionScript 3. Place code in the first frame Actions.
var t:TextField=new TextField();
t.text="Hello World!";
addChild(t);

2 changes: 2 additions & 0 deletions hello.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
10 REM Hello World in BASIC
20 PRINT "Hello World!"
4 changes: 4 additions & 0 deletions hello.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ECHO OFF
REM Hello World for DOS batch

ECHO Hello World!
6 changes: 6 additions & 0 deletions hello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main(void)
{
printf("hello, world\n");
}
12 changes: 12 additions & 0 deletions hello.cbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* Hello World in COBOL

*****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY "Hello World!"
STOP RUN.
****************************
7 changes: 7 additions & 0 deletions hello.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <iostream.h>

main()
{
cout << "Hello World!" << endl;
return 0;
}
7 changes: 7 additions & 0 deletions hello.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HelloWorld
{
static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
5 changes: 5 additions & 0 deletions hello.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Hello world in Dart

main() {
print('Hello world!');
}
8 changes: 8 additions & 0 deletions hello.dfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/ Hello World in Delphi
Program Hello_World;

{$APPTYPE CONSOLE}

Begin
WriteLn('Hello World');
End.
8 changes: 8 additions & 0 deletions hello.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%% Hello World in Erlang

-module(hello).

-export([hello/0]).

hello() ->
io:format("Hello World!~n", []).
3 changes: 3 additions & 0 deletions hello.fal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Hello World in Falcon

> "Hello World!"
7 changes: 7 additions & 0 deletions hello.for
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
C Hello World in Fortran

PROGRAM HELLO
WRITE (*,100)
STOP
100 FORMAT (' Hello World! ' /)
END
2 changes: 2 additions & 0 deletions hello.fox
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*Hello World in Microsoft Visual FoxPro 5-9
? "Hello World!"
4 changes: 4 additions & 0 deletions hello.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Hello World in Haskell

main = putStrLn "Hello World"

9 changes: 9 additions & 0 deletions hello.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<HTML>
<!-- Hello World in HTML -->
<HEAD>
<TITLE>Hello World!</TITLE>
</HEAD>
<BODY>
Hello World!
</BODY>
</HTML>
5 changes: 5 additions & 0 deletions hello.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
4 changes: 4 additions & 0 deletions hello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function hello_world() {
// Hello World in JavaScript
document.write('Hello World');
}
5 changes: 5 additions & 0 deletions hello.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;;; Hello World in Common Lisp

(defun helloworld ()
(print "Hello World!")
)
4 changes: 4 additions & 0 deletions hello.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Hello World in Lua

print "Hello world"

11 changes: 11 additions & 0 deletions hello.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# import "Recipient.h"

@implementation Recipient

- (id)hello {
printf("Recipient says hello!\n");

return self;
}

@end
3 changes: 3 additions & 0 deletions hello.maple
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hello World in Maple

>> printf("Hello World!");
3 changes: 3 additions & 0 deletions hello.matlab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% Hello World in MATLAB.

disp('Hello World');
6 changes: 6 additions & 0 deletions hello.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{Hello World in Pascal}

program HelloWorld(output);
begin
WriteLn('Hello World!');
end.
3 changes: 3 additions & 0 deletions hello.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
// Hello World in PHP
echo 'Hello World!';
3 changes: 3 additions & 0 deletions hello.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hello world in perl

print "Hello World!\n";
10 changes: 10 additions & 0 deletions hello.psql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Hello World in PL/pgSQL (PostgreSQL Procedural Language)
-- In old versions replace '$$' by double qoutes

CREATE FUNCTION hello_world() RETURNS text AS $$
BEGIN
RETURN 'Hello World';
END
$$ LANGUAGE plpgsql;

SELECT hello_world();
2 changes: 2 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Hello World in Python
print "Hello World"
3 changes: 3 additions & 0 deletions hello.qb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REM Hello World in QuickBASIC
PRINT "Hello World!"
END
2 changes: 2 additions & 0 deletions hello.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Hello World in Ruby
puts "Hello World!"
5 changes: 5 additions & 0 deletions hello.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Hello World in Scala

object HelloWorld with Application {
Console.println("Hello world!");
}
3 changes: 3 additions & 0 deletions hello.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
STR="Hello World!"
echo $STR
11 changes: 11 additions & 0 deletions hello.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Hello World in Verilog. */

module main;

initial
begin
$display("Hello, World");
$finish ;
end

endmodule
2 changes: 2 additions & 0 deletions hello.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
' Hello World in VBScript (Windows Scripting Host)
msgbox "Hello, World!"
14 changes: 14 additions & 0 deletions hello.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--Hello World in VHDL

ENTITY helloworld IS
END helloworld;

ARCHITECTURE hw OF helloworld IS

BEGIN

ASSERT FALSE
REPORT "HELLO, WORLD!"
SEVERITY NOTE;

END hw;
15 changes: 15 additions & 0 deletions hello.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Hello World in XHTML -->
<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>
Hello World!
</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
11 changes: 11 additions & 0 deletions table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE STATION
(ID INTEGER PRIMARY KEY,
CITY CHAR(20),
STATE CHAR(2),
LAT_N REAL,
LONG_W REAL);

INSERT INTO STATION VALUES (13, 'Phoenix', 'AZ', 33, 112);
INSERT INTO STATION VALUES (44, 'Denver', 'CO', 40, 105);
INSERT INTO STATION VALUES (66, 'Caribou', 'ME', 47, 68);

0 comments on commit eb5d8e3

Please sign in to comment.