Posté(e) le 3 juillet 200421 a 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 @+ Modifié le 9 novembre 200717 a par Quarky
Posté(e) le 3 juillet 200421 a 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 ^^ Modifié le 21 septembre 200519 a par Sarvok
Posté(e) le 3 juillet 200421 a <p>Hello world !</p> <? echo('Hello world !'); ?> heu j'suis plus très sûr de la syntaxe tout à coup
Posté(e) le 3 juillet 200421 a 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;
Posté(e) le 3 juillet 200421 a 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 ! Modifié le 3 juillet 200421 a par MAKB
Posté(e) le 3 juillet 200421 a 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 !"); } } Modifié le 3 juillet 200421 a par Sentinel
Posté(e) le 3 juillet 200421 a 00100100101010010001010110010100100100100100100100010010 10001010110010100100100100100100100010010010010010010010 00010010010010010010010001001001000100100100100100100101 01010110010100100100010010001001001001001001001001001001 01001000100100100100100100100101100101001001001001001101 00010010010010010010010010110010100100100100100110010010 00100100100010010010010010010010101001001001001001001000 en binair lol , non je deconne
Posté(e) le 3 juillet 200421 a Auteur Excellent les gars! Continuez comme ça il en reste des languages! PEARL, COBOL.... @+ et arigato goizaimasu
Posté(e) le 3 juillet 200421 a 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 Modifié le 3 juillet 200421 a par MAKB
Posté(e) le 4 juillet 200421 a en newbbasic: { function ("y") { raise ( * ) # "hello world!" ; func(opennewwindow); /function } /raise }
Posté(e) le 5 juillet 200420 a Auteur Oulà je commence à prendre du retard! Merci à tous pour votre participation, je ferais la MAJ de la liste cette nuit.
Posté(e) le 7 juillet 200420 a 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 :)
Posté(e) le 7 juillet 200420 a 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.
Posté(e) le 7 juillet 200420 a Ca me rappelle la blagounette : http://futureshare.lip6.fr/Humour/humour13.html
Posté(e) le 7 juillet 200420 a 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
Posté(e) le 7 juillet 200420 a En morse .... . .-.. .-.. --- .-- --- .-. .-.. -.. (ce qui veut dire Hello world!) En braille On a dit les langages de programmation, pas les langages tout court
Rejoindre la conversation
Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.