From eb5d8e302a0b7be696a463563cee8fe7182b2464 Mon Sep 17 00:00:00 2001 From: Marius786 Date: Fri, 29 Aug 2014 20:25:01 +0300 Subject: [PATCH] Add some hello programms examples --- hello.abap | 2 ++ hello.ads | 8 ++++++++ hello.as.txt | 5 +++++ hello.bas | 2 ++ hello.bat | 4 ++++ hello.c | 6 ++++++ hello.cbl | 12 ++++++++++++ hello.cpp | 7 +++++++ hello.cs | 7 +++++++ hello.dart | 5 +++++ hello.dfm | 8 ++++++++ hello.erl | 8 ++++++++ hello.fal | 3 +++ hello.for | 7 +++++++ hello.fox | 2 ++ hello.hs | 4 ++++ hello.html | 9 +++++++++ hello.java | 5 +++++ hello.js | 4 ++++ hello.lisp | 5 +++++ hello.lua | 4 ++++ hello.m | 11 +++++++++++ hello.maple | 3 +++ hello.matlab | 3 +++ hello.pas | 6 ++++++ hello.php | 3 +++ hello.pl | 3 +++ hello.psql | 10 ++++++++++ hello.py | 2 ++ hello.qb | 3 +++ hello.rb | 2 ++ hello.scala | 5 +++++ hello.sh | 3 +++ hello.v | 11 +++++++++++ hello.vbs | 2 ++ hello.vhdl | 14 ++++++++++++++ hello.xml | 15 +++++++++++++++ table.sql | 11 +++++++++++ 38 files changed, 224 insertions(+) create mode 100644 hello.abap create mode 100644 hello.ads create mode 100644 hello.as.txt create mode 100644 hello.bas create mode 100644 hello.bat create mode 100644 hello.c create mode 100644 hello.cbl create mode 100644 hello.cpp create mode 100644 hello.cs create mode 100644 hello.dart create mode 100644 hello.dfm create mode 100644 hello.erl create mode 100644 hello.fal create mode 100644 hello.for create mode 100644 hello.fox create mode 100644 hello.hs create mode 100644 hello.html create mode 100644 hello.java create mode 100644 hello.js create mode 100644 hello.lisp create mode 100644 hello.lua create mode 100644 hello.m create mode 100644 hello.maple create mode 100644 hello.matlab create mode 100644 hello.pas create mode 100644 hello.php create mode 100644 hello.pl create mode 100644 hello.psql create mode 100644 hello.py create mode 100644 hello.qb create mode 100644 hello.rb create mode 100644 hello.scala create mode 100644 hello.sh create mode 100644 hello.v create mode 100644 hello.vbs create mode 100644 hello.vhdl create mode 100644 hello.xml create mode 100644 table.sql diff --git a/hello.abap b/hello.abap new file mode 100644 index 0000000..d3c63d8 --- /dev/null +++ b/hello.abap @@ -0,0 +1,2 @@ +REPORT TEST. +WRITE 'Hello World'. diff --git a/hello.ads b/hello.ads new file mode 100644 index 0000000..3d442e7 --- /dev/null +++ b/hello.ads @@ -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; diff --git a/hello.as.txt b/hello.as.txt new file mode 100644 index 0000000..6ff2331 --- /dev/null +++ b/hello.as.txt @@ -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); + diff --git a/hello.bas b/hello.bas new file mode 100644 index 0000000..e45573a --- /dev/null +++ b/hello.bas @@ -0,0 +1,2 @@ +10 REM Hello World in BASIC +20 PRINT "Hello World!" diff --git a/hello.bat b/hello.bat new file mode 100644 index 0000000..65093bc --- /dev/null +++ b/hello.bat @@ -0,0 +1,4 @@ +@ECHO OFF +REM Hello World for DOS batch + +ECHO Hello World! diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..fd20323 --- /dev/null +++ b/hello.c @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + printf("hello, world\n"); +} diff --git a/hello.cbl b/hello.cbl new file mode 100644 index 0000000..a50188b --- /dev/null +++ b/hello.cbl @@ -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. +**************************** diff --git a/hello.cpp b/hello.cpp new file mode 100644 index 0000000..119cb5c --- /dev/null +++ b/hello.cpp @@ -0,0 +1,7 @@ +#include + +main() +{ + cout << "Hello World!" << endl; + return 0; +} diff --git a/hello.cs b/hello.cs new file mode 100644 index 0000000..ad224cf --- /dev/null +++ b/hello.cs @@ -0,0 +1,7 @@ +class HelloWorld +{ + static void Main() + { + System.Console.WriteLine("Hello, World!"); + } +} diff --git a/hello.dart b/hello.dart new file mode 100644 index 0000000..614d908 --- /dev/null +++ b/hello.dart @@ -0,0 +1,5 @@ +// Hello world in Dart + +main() { + print('Hello world!'); +} diff --git a/hello.dfm b/hello.dfm new file mode 100644 index 0000000..176624e --- /dev/null +++ b/hello.dfm @@ -0,0 +1,8 @@ +/ Hello World in Delphi +Program Hello_World; + +{$APPTYPE CONSOLE} + +Begin + WriteLn('Hello World'); +End. diff --git a/hello.erl b/hello.erl new file mode 100644 index 0000000..dada888 --- /dev/null +++ b/hello.erl @@ -0,0 +1,8 @@ +%% Hello World in Erlang + +-module(hello). + +-export([hello/0]). + +hello() -> + io:format("Hello World!~n", []). diff --git a/hello.fal b/hello.fal new file mode 100644 index 0000000..a564f1a --- /dev/null +++ b/hello.fal @@ -0,0 +1,3 @@ +// Hello World in Falcon + +> "Hello World!" diff --git a/hello.for b/hello.for new file mode 100644 index 0000000..19d3f29 --- /dev/null +++ b/hello.for @@ -0,0 +1,7 @@ +C Hello World in Fortran + + PROGRAM HELLO + WRITE (*,100) + STOP + 100 FORMAT (' Hello World! ' /) + END diff --git a/hello.fox b/hello.fox new file mode 100644 index 0000000..19436c3 --- /dev/null +++ b/hello.fox @@ -0,0 +1,2 @@ +*Hello World in Microsoft Visual FoxPro 5-9 +? "Hello World!" diff --git a/hello.hs b/hello.hs new file mode 100644 index 0000000..dda4f61 --- /dev/null +++ b/hello.hs @@ -0,0 +1,4 @@ +-- Hello World in Haskell + +main = putStrLn "Hello World" + diff --git a/hello.html b/hello.html new file mode 100644 index 0000000..c495287 --- /dev/null +++ b/hello.html @@ -0,0 +1,9 @@ + + + +Hello World! + + +Hello World! + + diff --git a/hello.java b/hello.java new file mode 100644 index 0000000..95b5ac1 --- /dev/null +++ b/hello.java @@ -0,0 +1,5 @@ +class HelloWorld { + static public void main( String args[] ) { + System.out.println( "Hello World!" ); + } +} diff --git a/hello.js b/hello.js new file mode 100644 index 0000000..f604460 --- /dev/null +++ b/hello.js @@ -0,0 +1,4 @@ +function hello_world() { + // Hello World in JavaScript + document.write('Hello World'); +} diff --git a/hello.lisp b/hello.lisp new file mode 100644 index 0000000..a92d2a9 --- /dev/null +++ b/hello.lisp @@ -0,0 +1,5 @@ +;;; Hello World in Common Lisp + +(defun helloworld () + (print "Hello World!") +) diff --git a/hello.lua b/hello.lua new file mode 100644 index 0000000..43eb66a --- /dev/null +++ b/hello.lua @@ -0,0 +1,4 @@ +# Hello World in Lua + +print "Hello world" + diff --git a/hello.m b/hello.m new file mode 100644 index 0000000..21afc99 --- /dev/null +++ b/hello.m @@ -0,0 +1,11 @@ +# import "Recipient.h" + +@implementation Recipient + +- (id)hello { + printf("Recipient says hello!\n"); + + return self; +} + +@end diff --git a/hello.maple b/hello.maple new file mode 100644 index 0000000..a98347a --- /dev/null +++ b/hello.maple @@ -0,0 +1,3 @@ +# Hello World in Maple + +>> printf("Hello World!"); diff --git a/hello.matlab b/hello.matlab new file mode 100644 index 0000000..954423b --- /dev/null +++ b/hello.matlab @@ -0,0 +1,3 @@ +% Hello World in MATLAB. + +disp('Hello World'); diff --git a/hello.pas b/hello.pas new file mode 100644 index 0000000..3b0de57 --- /dev/null +++ b/hello.pas @@ -0,0 +1,6 @@ +{Hello World in Pascal} + +program HelloWorld(output); +begin + WriteLn('Hello World!'); +end. diff --git a/hello.php b/hello.php new file mode 100644 index 0000000..d880247 --- /dev/null +++ b/hello.php @@ -0,0 +1,3 @@ + + + + + + + Hello World! + + + +

Hello World!

+ + diff --git a/table.sql b/table.sql new file mode 100644 index 0000000..e6008af --- /dev/null +++ b/table.sql @@ -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); +