Taki Posted July 3, 2004 Share Posted July 3, 2004 (edited) 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: Quand un anglo-saxon débute en programmation ou touche pour la première fois à un langage particulier, il fait un petit programme qui dit bonjour à tout le monde. L'expression " Hello, world ! " déigne ainsi quelque chose d'élémentaire. 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 @+ Edited November 9, 2007 by Quarky Quote Link to comment Share on other sites More sharing options...
Sarvok Posted July 3, 2004 Share Posted July 3, 2004 (edited) J'vais le donner en C/C++ : #include <stdio.h> main() { printf(" Il y deux types d'hommes sur terre, les INpactiens , et ceux qui creusent..."); return 0; } Vous inquietez pas, ca va les chevilles ^^ Edited September 21, 2005 by Sarvok Quote Link to comment Share on other sites More sharing options...
mogwai93 Posted July 3, 2004 Share Posted July 3, 2004 En pascal : BEGIN WriteLn('Hello World'); END. Quote Link to comment Share on other sites More sharing options...
Annubis45 Posted July 3, 2004 Share Posted July 3, 2004 include <iostream.h> main() {cout << "HELLO WORLD";} c en c++ Quote Link to comment Share on other sites More sharing options...
milohoffman Posted July 3, 2004 Share Posted July 3, 2004 <p>Hello world !</p> <? echo('Hello world !'); ?> heu j'suis plus très sûr de la syntaxe tout à coup Quote Link to comment Share on other sites More sharing options...
Sentinel Posted July 3, 2004 Share Posted July 3, 2004 En python... le programme complet tient en 1 line : print "Hello World!" Une procédure stockée pour Oracle : CREATE PROCEDURE hello AS BEGIN DBMS_OUTPUT.PUT_LINE("Hello World!"); END; Quote Link to comment Share on other sites More sharing options...
MAKB Posted July 3, 2004 Share Posted July 3, 2004 (edited) en JAVA import javax.swing.*; public class HelloWorld { JOptionPane.showMessageDialog(null, "Hello world"); System.exit(0); } Voilà sa fait un de plus Taki Oups t'a raison sa fait lgt que j'ai fait du Java au moins 1 an et là je l'ai fait de tete , sorry pour les fautes, c vrai que le "public static void main(String[] args)" j'aurai du y penser ! Mais bon tu veille Sentinel, merchi , prochaine fois je reguarde dans mon cours ! Edited July 3, 2004 by MAKB Quote Link to comment Share on other sites More sharing options...
Sentinel Posted July 3, 2004 Share Posted July 3, 2004 (edited) Strictement aucun intérêt ton "import javax.swing.*" ... Et en plus ton code ne risque pas de fonctionner, tu n'as même pas de main... Voilà un code qui fonctionne, lui : public Class Hello { public static void main(String[] args) { System.out.println("Hello World !"); } } Edited July 3, 2004 by Sentinel Quote Link to comment Share on other sites More sharing options...
Annubis45 Posted July 3, 2004 Share Posted July 3, 2004 00100100101010010001010110010100100100100100100100010010 10001010110010100100100100100100100010010010010010010010 00010010010010010010010001001001000100100100100100100101 01010110010100100100010010001001001001001001001001001001 01001000100100100100100100100101100101001001001001001101 00010010010010010010010010110010100100100100100110010010 00100100100010010010010010010010101001001001001001001000 en binair lol , non je deconne Quote Link to comment Share on other sites More sharing options...
miyamoto Posted July 3, 2004 Share Posted July 3, 2004 http://en.wikipedia.org/wiki/Hello_world_program Quote Link to comment Share on other sites More sharing options...
Taki Posted July 3, 2004 Author Share Posted July 3, 2004 Excellent les gars! Continuez comme ça il en reste des languages! PEARL, COBOL.... @+ et arigato goizaimasu Quote Link to comment Share on other sites More sharing options...
MAKB Posted July 3, 2004 Share Posted July 3, 2004 (edited) EN Perl print "Hello world\n"; En HTML <html> <body> <p>Hello world</p> </body> </html> En Java Script <script type="text/javascript"> <!-- function hello() { alert("HelloWorld"); } //--> </script> Mnt je test pour plus me faire engirlander par Sentinel lol Edited July 3, 2004 by MAKB Quote Link to comment Share on other sites More sharing options...
milohoffman Posted July 3, 2004 Share Posted July 3, 2004 ouarf je me souvenais pu si c'était des ' ou des " Quote Link to comment Share on other sites More sharing options...
Annubis45 Posted July 3, 2004 Share Posted July 3, 2004 sous word: HELLO WORD Quote Link to comment Share on other sites More sharing options...
milohoffman Posted July 3, 2004 Share Posted July 3, 2004 sous word:HELLO WORD Quote Link to comment Share on other sites More sharing options...
Sentinel Posted July 3, 2004 Share Posted July 3, 2004 et au boulot : HELLO WORK ! ---> [] Quote Link to comment Share on other sites More sharing options...
Xtrem Newbie Posted July 4, 2004 Share Posted July 4, 2004 en newbbasic: { function ("y") { raise ( * ) # "hello world!" ; func(opennewwindow); /function } /raise } Quote Link to comment Share on other sites More sharing options...
njoyard Posted July 5, 2004 Share Posted July 5, 2004 en vb (lol): Sub Main() MsgBox("Hello world!") End Sub Quote Link to comment Share on other sites More sharing options...
Taki Posted July 5, 2004 Author Share Posted July 5, 2004 Oulà je commence à prendre du retard! Merci à tous pour votre participation, je ferais la MAJ de la liste cette nuit. Quote Link to comment Share on other sites More sharing options...
Taki Posted July 6, 2004 Author Share Posted July 6, 2004 Oups je l'ai pas fait! non ne me tapez pas! xD Quote Link to comment Share on other sites More sharing options...
sky99 Posted July 7, 2004 Share Posted July 7, 2004 bon, je sais qu'on va pas commencer a chipoter mais pour le code php, un simple <?php echo "hello world"; //ou bien: print "hello world"; ?> aurait suffi (enfin ça n'a pas d'importance, mais bon, pour moi le code le plus lisible et le plus simple possible reste toujours souhaitable :) enfin bon, topic sympatique, que je rajoute dans les liens , et bonne continuation :) Quote Link to comment Share on other sites More sharing options...
Irgoff Posted July 7, 2004 Share Posted July 7, 2004 En Caml : let = print_endline "Hello world !";; ColdFusion : <cfset hello = "Hello World !"> <cfoutput>#hello#</cfoutput> En C# : class INpactApp { public static void Main() { System.Console.WriteLine("Hello world !"); } } En COBOL : IDENTIFICATION DIVISION. PROGRAM-ID. HELLOWORLD. ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. DISPLAY "Hello world !". STOP RUN. Quote Link to comment Share on other sites More sharing options...
Irgoff Posted July 7, 2004 Share Posted July 7, 2004 Ca me rappelle la blagounette : http://futureshare.lip6.fr/Humour/humour13.html Quote Link to comment Share on other sites More sharing options...
Charles.w Posted July 7, 2004 Share Posted July 7, 2004 ADA83 / ADA95 With STANDARD_IO; Use STANDARD_IO; Procedure HELLO_WORLD is begin Put("Hello world!"); End HELLO_WORLD; En morse .... . .-.. .-.. --- .-- --- .-. .-.. -.. (ce qui veut dire Hello world!) En braille Quote Link to comment Share on other sites More sharing options...
Illusion Posted July 7, 2004 Share Posted July 7, 2004 En morse .... . .-.. .-.. --- .-- --- .-. .-.. -.. (ce qui veut dire Hello world!) En braille On a dit les langages de programmation, pas les langages tout court Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.