Voilà ça serait marrant dans ce sujet de rassembler les façons d'écrire à l'écran "Hello World!" dans tous les languages de programmation existants.
Pour rappel:
Je tiendrais ce post à jour si vous suivez le délire
Je commence donc:
---------------------------------------------------------------------------------------------------
ABAP (langage SAP)
REPORT ZSHELLO01.
START-OF-SELECTION.
FORMAT INTENSIFIED OFF.
WRITE : /5 'Hello World !!'.
FORMAT RESET.
ActionScript
stop();
trace("Hello World");
import mx.transitions.Tween;
import mx.transitions.easing.*;
var helloClip_mc :MovieClip = this.createEmptyMovieClip("helloClip_mc",1);
var sayHello_txt :TextField = this.helloClip_mc.createTextField("sayHello_txt",2,0,0,0,0);
var formatHello_fmt :TextFormat = new TextFormat();
with(formatHello_fmt) {
color = 0x000000;
size = 50;
font = "Arial";
}
with(helloClip_mc.sayHello_txt) {
autoSize = "left";
text = "Hello World";
setTextFormat(formatHello_fmt);
_x=(Stage.width-this._width)/2;
_y=(Stage.height-this._height)/2;
}
var helloTween : Tween = new Tween(helloClip_mc, "_y", Bounce.easeOut, Stage.height+helloClip_mc.sayHello_txt._height, 0, 1, true);
ADA83 / ADA95
With STANDARD_IO;
Use STANDARD_IO;
Procedure HELLO_WORLD is
begin
Put("Hello world!");
End HELLO_WORLD;
AppleScript
display dialog "hello world"
ASSEMBLEUR x86, compilateur TASM
.model small
.stack 100h
.data
hello db "Hello the World !$"
.code
main proc
MOV AX,@data
MOV DS,AX
MOV DX,offset hello
MOV AX,0900h
INT 21h
MOV AX,4C00h
INT 21h
main endp
end main
ASSEMBLEUR Z80 (ça rajeuni pas ça )
;mettre ici tous les includes nécessaires en fonction de la machine utilisée plus les routines utilisées plus bas
start:
bcall(_clrlcdf)
ld hl,helloworld
bcall(_puts)
ret
helloworld:
db "Hello world",0
.end
BASIC
10 print "Hello World!"
C/C++/C# (pour le dernier , prononcez "C Sharp", la classe xD)
include <iostream.h>
main() {cout << "HELLO WORLD";}
include #stdio.h
main() {
printf("Hello world, Sarvok is Now the Best");
return 0;
}
class INpactApp {
public static void Main() {
System.Console.WriteLine("Hello world !");
}
}
CAML
let = print_endline "Hello world !";;
COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY "Hello world !".
STOP RUN.
COLDFUSION
<cfset hello = "Hello World !">
<cfoutput>#hello#</cfoutput>
DOS
echo Hello World !
HTML
<html>
<body>
<p>Hello world</p>
</body>
</html>
IDL
PRO hello
print,'Hello World!'
END
Installshield Script
function PrintHello()
begin
Sprintf(gsBuffer,"Hello World");
MessageBox(gsBuffer,SEVERE);
end;
JAVA
public Class Hello
{
public static void main(String[] args)
{
System.out.println("Hello World !");
}
}
JAVASCRIPT
<script type="text/javascript">
<!--
function hello()
{
alert("HelloWorld");
}
//-->
</script>
Lisaac
Section Header
- name := HELLO_WORLD;
Section Public
- main <-
(
"Hello world\n".print;
);
LolCode
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
NEWBASIC
{ function ("y")
{ raise ( * )
# "hello world!"; func(opennewwindow);
/function }
/raise }
ORACLE
CREATE PROCEDURE hello AS
BEGIN
DBMS_OUTPUT.PRINT_LINE("Hello World!");
END;
PASCAL
BEGIN
WriteLn('Hello World');
END.
PERL
print "Hello world\n";
PHP
<?php
echo "Hello World!";
?>
<?="Hello World";?>
PYTHON
print "Hello World!"
Ti basic
Disp "HELLO WORLD"
VIRTUALBASIC
Sub Main()
MsgBox("Hello world!")
End Sub
Je mettrais des greets plus tard, merci les gars
@+