• 几乎所有编程语言的hello, world程序(3)


    LSL

    // Hello World in Linden Scripting Language (LSL)
    
    default
    {
        state_entry()
        {
            llSay(0, "Hello World");
        }
    }

    Lua

    # Hello World in Lua
    
    print "Hello world"

    m4

    # Hello World for the m4 macro processor
    Hello

    MACRO-10

    TITLE HELLO WORLD
    ; HELLO WORLD IN MACRO 10 FOR TOPS-10
    ENTRY OUTPUT
    SEARCH UUOSYM
    
    LAB:    ASCIZ /HELLO WORLD
    /
    OUTPUT: OUTSTR LAB              ; OUTPUT MESSAGE
            MONRT.                  ; RETURN TO MONITOR          
            END OUTPUT

    MACRO-11

    ;       "Hello, world!" in MACRO-11 for RT-11
    
            .MCALL  .EXIT,.PRINT
    START:  .PRINT  #$1
            .EXIT
    $1:     .ASCIZ  /Hello, world!/
            .END    START

    Macromedia-Flex

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
         <!-- Hello Word in Macromedia Flex -->
         <mx:Label text="Hello World"/>
    </mx:Application>

    make

    # Hello world as a makefile
    
    all:
        @echo "Hello world!"

    Malbolge

    Hello World in Malbolge. No comment character exists.
    
    (=<`$9]7<5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrkpohm-kNi;gsedcba`_^][ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543s+O<oLm

    MAMASH

    /* Hello World in MAMASH */
    
    TQWD LGYEA NXKIA HELLO_WORLD )1(
    
    DWLH CXBZ_YKX
    
    ID& HELLO_WORLD YED 'HELLO WORLD' .

    Maple

    # Hello World in Maple
    
    >> printf("Hello World!");
    

    Mathematica

    (* Hello World in Mathematica *)
    
    Hello[] := Print["Hello, World!"]

    MATLAB

    % Hello World in MATLAB.
    
    disp('Hello World');

    Maxima

    /*  Hello World in Maxima */
    
    disp("hello, world");

    MAXScript

    /*Hello World in MAXScript (the script language of 3ds Max).
    Hello World is both printed as text and in full 3D.*/
    
    Print "Hello World"
    Text text:"Hello World"

    MDM Zinc

    // Hello world in MDM Zinc
    
    mdm.Dialogs.prompt("Hello World");
    mdm.Application.exit();

    MEL

    // Hello World in MEL scripting language for Alias Maya
    
    proc helloWorld () {
       print "Hello World!
    ";
    }
    
    helloWorld;

    MetaPost

    % Hello World in MetaPost
    beginfig(0);
      label("Hello, world!", (10,10));
    endfig;

    MEX

    // "Hello, World!" in MEX for Maximus BBS
    
    void main()
    {
      print(COLOR_WHITE,"Hello, World!
    ");
    }

    Microtik

    #Hello World in Mikrotik RouterOS Scripting Host; :put ("Hello, World!");

    mIRC-Alias

    ;Hello World for mIRC (alias section)
    
    helloworld: /echo -a Hello World!

    mIRC-Commandline

    ; Hello World! for mIRC (command line version)
    
    echo Hello World!

    mIRC-Script

    ;Hello World for mIRC script
    
    alias helloworld {
      /echo -a Hello World!
    }

    MivaScript

    <MvCOMMENT>Hello World in Miva Script</MvCOMMENT>
    <MvEVAL EXPR="{'Hello World'}">

    MML-AXE10

    Back to index 
    ! Hello world program in MML for Ericsson's AXE10 telephone exchange
    IOTXP:Hello World;

    Modula-2

    (* Hello World in Modula-2 *)
    
    MODULE HelloWorld;
    FROM InOut IMPORT WriteString,WriteLn;
    BEGIN
      WriteString("Hello World!");
      WriteLn;
    END HelloWorld.

    Modula-3

    (* Hello World in Modula-3 *)
    
    MODULE Hello EXPORTS Main;
    
    IMPORT IO;
    
    BEGIN
     IO.Put("Hello World!
    ");
    END Hello.
    

    MoHAA-Script

    // Hello World in the Medal of Honor Allied Assault scripting language
    
    iprintln "Hello World!"

    MOO

    "Hello World in MOO";
    
    player.location:announce_all("Hello, world!");
    

    Mouse

    ~ Hello World in Mouse
    
    "HELLO, WORLD."
    $

    MPD

    
    # Hello World in MPD.
    
    resource helloworld()
      write("Hello World")
    end
    

    MS Small Basic

    ' Hello World in Microsoft Small Basic
    
    TextWindow.WriteLine("Hello, World")
    

    MSDOS

    @ECHO OFF
    REM Hello World for DOS batch
    
    ECHO Hello World!
    

    MSIL

    //Hello World in MSIL (.NET assembler)
    
    .assembly helloworld {}
    .class helloworld
    {
     .method static void Main() cil managed
     {
      .entrypoint
      ldstr "Hello World!"
      call void [mscorlib]System.Console::WriteLine(string)
      ret
     }
    }
    

    MuLisp

    
    ; Hello, World! in MuLisp
    
    (print 'Hello\, world!)
    

    Mumps

    ; Hello World in Mumps-M
     w !,"Hello World"
    

    Natural

    
     * Hello World in Natural (by Software AG)
    Write "Hello, World!".
    

    Nemerle

    // Hello World in Nemerle (a functional programming language for .NET)
    
    System.Console.WriteLine("Hello World");
    

    newLISP

    ;; Hello World in newLISP
    
    (println "Hello World")
    

    NewtonScript

    // Hello World in NewtonScript
    
    baseview :=
       {viewBounds: {left: -3, top: 71, right: 138, bottom: 137},
        viewFlags: 581,
        declareSelf: 'base,
        _proto: protoFloatNGo,
        debug: "baseview"
       };
    
    textview := * child of baseview *
       {text: "Hello World!",
        viewBounds: {left: 33, top: 24, right: 113, bottom: 46},
        viewFlags: 579,
        _proto: protoStaticText,
        debug: "textview"
       };

    Nice

    //Hello World in Nice
    
    void main(String[] args){ 
       println("hello world"); 
    }

    Nim

    
    # Hello world in Nim
    
    echo "Hello World"
    

    Node.js

    
    /* Hello world in Node.js */
    
    var sys = require('sys');
    sys.puts('Hello World');

    NSIS

    ; Hello World in Nullsoft Software Install Script (NSIS)
    
    Caption "Hello World!"
    OutFile ".HelloWorld.exe"
    SilentInstall silent
    
    Section ""
            MessageBox MB_OK "Hello World!"
    SectionEnd
    

    NXC

    /* Hello World in NXC ("Not Exactly C") */
    
    #include "NXCDefs.h"
    
    task main()
    {
     TextOut(0, LCD_LINE1, "Hello World!");
    }

    Oberon.oberon

    
    MODULE HelloWorld;
    
    (* Hello World in Oberon for the Oberon System *)
    
      IMPORT Oberon, Texts;
    
      VAR
          W: Texts.Writer;
    
      PROCEDURE Do*;
        BEGIN
            Texts.WriteString(W,"Hello World!");
                Texts.WriteLn(W);
                    Texts.Append(Oberon.Log,W.buf)
                      END Do;
    
    BEGIN Texts.OpenWriter(W)
    END HelloWorld.
    

    Oberon.std

    (* Hello World in Oberon for standard operating systems *)
    
    MODULE HelloWorld;
    IMPORT Out;
    BEGIN
      Out.String("Hello World!");
      Out.Ln;
    END HelloWorld;

    OCaml

    (* Hello World in OCaml *)
    
    print_string "Hello World!
    ";;
    

    Occam

    PROGRAM Hello
    -- Hello world in Occam
    #USE ioconv
    

    SEQ

      write.full.string(screen,"Hello World!")
    

    Octave

    
    #Hello World in Octave (http://www.octave.org/)
    printf("Hello World
    ");
    

    Ook

    
    Hello World in Ook. No comments possible.
    
    Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
    Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
    Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
    Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
    Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
    Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
    Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook!
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    Ook. Ook. Ook. Ook. Ook! Ook.
    
    

    OpenVMS

    $! Hello World in OpenVMS DCL
    
    $ write sys$output "Hello World"
    
    

    OPL.dialog

    
    REM Hello World for OPL (Psion Organizer 3a)
    REM More complex version with menues and dialog boxes
    
    PROC HELLO:
      LOCAL M%
      DO
        REM Display menu bar
        mINIT
        mCARD "Sprache","Deutsch",%d,"English",%e
        mCARD "Extras","Beenden",%x,"Info",%i
        M%=MENU
        REM process choosen function
        IF M%=%d
          REM Display german dialog box
          REM with an ENTER button to continue
          dBOX:(" ","Hallo Welt"," ","weiter",13)
        ELSEIF M%=%e
          REM Display english dialog box
          REM with an ENTER button to continue
          dBOX:(" ","Hello World"," ","continue",13)
        ELSEIF M%=%i
          REM Display copyright information ;-)
          dBOX:("Info","(C) Klaus Müller 0196","FrankfurtMain, Germany","",13)
        ENDIF
      UNTIL M%=%x
    ENDP
    
    PROC dBOX:(Z1$,Z2$,Z3$,Z4$,BUTTON%)
      dINIT Z1$
      dTEXT ""," ",0
      dTEXT "",Z2$",$102
      dTEXT "",Z3$,$202
      dBUTTONS Z4$,BUTTON%
      DIALOG
    ENDP
    
    
    
    
    OPL.simple 
    Back to index 
    REM Hello World for OPL (Psion Organizer 3a)
    REM Simple version
    
    PROC HELLO:
      PRINT "Hello World!"
      GET
    ENDP
    

    Oz

    % Hello World in Oz
    
    functor
    import
      System
      Application
    define
      {System.showInfo "Hello World!"}
      {Application.exit 0}
    end

    Parser

    
    # Hello World in Parser
    
    Hello world!
    

    Pascal

    
    {Hello World in Pascal}
    
    program HelloWorld(output);
    begin
      WriteLn('Hello World!');
    end.
    

    Pascal-Windows

    { Hello World in Borland Pascal 7 for MS-Windows}
    
    PROGRAM HelloWorld;
    
    USES
      WinCRT;
    
    BEGIN
      InitWinCRT;
      WriteLn('Hello World!');
      ReadLn;
      DoneWinCRT;
    END.
    

    Pawn

    /* Hello World in Pawn */
    
    main()
    {
        printf "Hello World!"
    }
    

    PBASIC

    
    ' Hello World in PBASIC (for the Boe-Bot Robot)
    
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    DEBUG "Hello World!"
    
    END

    PDF

    %Hello World in Portable Document Format (PDF)
    %PDF-1.2
    1 0 obj
    <<
    /Type /Page
    /Parent 5 0 R
    /Resources 3 0 R
    /Contents 2 0 R
    >>
    endobj
    2 0 obj
    <<
    /Length 51
    >>
    stream
    BT
    /F1 24 Tf
    1 0 0 1 260 600 Tm
    (Hello World)Tj
    ET
    endstream
    endobj
    3 0 obj
    <<
    /ProcSet[/PDF/Text]
    /Font <</F1 4 0 R >>
    >>
    endobj
    4 0 obj
    <<
    /Type /Font
    /Subtype /Type1
    /Name /F1
    /BaseFont /Arial
    >>
    endobj
    5 0 obj
    <<
    /Type /Pages
    /Kids [ 1 0 R ]
    /Count 1
    /MediaBox
    [ 0 0 612 792 ]
    >>
    endobj
    6 0 obj
    <<
    /Type /Catalog
    /Pages 5 0 R
    >>
    endobj
    trailer
    <<
    /Root 6 0 R
    >>

    PEARL

    MODULE (HELLO);
    /* Hello World in PEARL (Process and Experiment Automation Realtime Language) */
      SYSTEM;
       TERMINAL:DIS<->SDVLS(2);
      PROBLEM;
       SPC TERMINAL DATION INOUT
             ALPHIC DIM(,) TFU MAX
             FORWARD CONTROL (ALL);
       MAIN:TASK;
         DCL TEXT INV CHAR(30)
              INIT('HELLO WORLD!');
        OPEN TERMINAL;
        PUT TEXT TO TERMINAL;
        CLOSE TERMINAL;
       END;
    MODEND;

    PeopleCode

    /* Hello World in PeopleCode 8.45
    
    &MsgText = MsgGetText(66666666, 999999999, "Hello World!");
    

    Perl

    # Hello world in perl
    
    print "Hello World!
    ";
    

    PHP

    <?php
    o
      // Hello World in PHP
      echo 'Hello World!';
    ?>

    PHP+GD

    <?
    // Hello World in PHP + GD library
    header("Content-type: image/gif");
    $rscImage    = imagecreatetruecolor(80, 25);
    $intFontC    = imagecolorallocate($rscImage, 255, 255, 255);
    $intBGC        = imagecolorallocate($rscImage, 0, 0, 0);
    imagestring($rscImage, 2, 5, 5, "Hello World!", $intFontC);
    imagegif($rscImage);
    imagedestroy($rscImage);
    ?>

    Piet

    Hello World in Piet. No comment character exists.
    

    Pike

    
    // Hello world in Pike (pike.roxen.com)
    
    int main(){
            write("Hello World!
    ");
    }
    

    Powershell

    # Hello World in Microsoft Powershell
    
    'Hello World!'

    PRAAT

    
    # Hello World in praat (www.praat.org)
    echo Hello World!
    
    ProC 
    
    /* Hello World in Pro*C, the Oracle's embedded SQL environment */
    
    #include <stdio.h>
    
    EXEC SQL INCLUDE SQLCA;
    
    int main() {
       char hello[15];
       char *user = "the_user";
       char *password = "the_password";
       char *sid = "the_sid";
    
       EXEC SQL CONNECT :user IDENTIFIED BY :password USING :sid;
    
       EXEC SQL
          SELECT 'Hello World' INTO :hello
          FROM DUAL;
    
       printf("%s
    ", hello);
    
       EXEC SQL COMMIT RELEASE;
    
       return 0;
    }
    

    Processing

    // Hello world in Processing
    
    println( "Hello world!" );
    

    Profan

    ' Hello World in Profan (http://www.profan.de/)
    
    cls
    print "Hello World!"
    waitkey
    

    Progress

    /* Hello World in Progress */
    
    message "Hello World" view-as alert-box.
    

    Prolog

    % Hello World in Prolog
    
    hello :- display('Hello World!') , nl .
    

    PureBasic-Console

    
    ; Hello World in PureBasic (console program)
    
    OpenConsole()
       ConsoleTitle ("Hello World!")
       PrintN ("Hello World!")
    CloseConsole()

    PureBasic-Messagebox

    ; Hello World in PureBasic (message box)
    
    MessageRequester("Hello World Messagebox","Hello World!")
    
    

    PureBasic-Window

    ; Hello World in PureBasic (Window)
    
    If OpenWindow(0, 216, 0, 268, 133,  #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered , "Hello World Window")
     If CreateGadgetList(WindowID())
       TextGadget(1, 100, 60, 60, 20, "Hello World!")
     EndIf
    EndIf
    
    Repeat    ; Message Loop
    Until WaitWindowEvent() = #PB_EventCloseWindow
    

    Python 2

    # Hello world in Python 2
    
    print "Hello World"
    

    Python 3

    
    # Hello world in Python 3 (aka Python 3000)
    
    print("Hello World")
    

    Regular-Expression

    Hello World as a regular expression.
    Replaces everything with "Hello World".
    For use with vi, sed, etc.
    
    Search String :  ^.*$
    Replace String: 'Hello World'
    
    

    Revolution

    -- Hello World in Revolution (formerly called Transcript)
    answer "Hello World!"
    

    Rey

    //beginning Hello World in Rey:
    
    korzystaj "Konsola";
    
    program
    {
        PiszLinia("Hello World");
    }
    //end Hello World in Rey
    

    RPG-IV

    H* Hello World in RPG IV
    
    D msg             S             32    inz(*blank)
    D cmd             S             64
    
    C                   eval      msg = 'Hello World'
    
    C     msg           dsply
    
    C                   eval      cmd = 'DLYJOB DLY(30)'
    C                   call      'QCMDEXC'
    C                   parm                    cmd
    C                   parm      64            len              15 5
    
    C                   eval      *inlr = *on
    
    

    Ruby

    # Hello World in Ruby
    puts "Hello World!"
    

    SApp

    comment: Hello World in SApp
    popup "Hello ## World!" ,
    

    SAS

    /* Hello world in SAS */
    * Writes as output title;
    TITLE "Hello World!";
    * writes to the log;
    PUT Hello world!;
    

    Sather

    -- Hello World in Sather
    
        class HELLO is
           main is #OUT + "Hello World!
    " end
        end

    Scala

    // Hello world in Scala
    
    object HelloWorld extends App {
      println("Hello world!")
    }

    Scheme

    ; Hello World in Scheme
    
    (display "Hello, world!")
    (newline)
    

    Self

    (|  "Hello World in Self"
    
      hello = (| | 'Hello World!' print)
    |)
    

    SMIL

    <!-- Hello World in SMIL -->
    <smil>
     <head>
      <layout>
       <root-layout width="300" height="160" background-color="white"/>
       <region id="text_region" left="115" top="60"/>
      </layout>
     </head>
     <body>
      <text src="data:,Hello%20World!" region="text_region">
       <param name="fontFace" value="Arial"/>
      </text>
     </body>
    </smil>

    SML

    (* Hello World in SML *)
    
    fun hello() = output(std_out, "Hello World!");
    

    Spiral

    Hello World in Spiral. No comment character exists.
    
    e0v ***   *eXlv**   *lX      *2X       **oXi
    v * * *   *     *   * 2      * o      **   v*
    * * * *   * *****   * v      * v      * *iX *
    * * * *   * *       * ^      v *      * * w *
    * *** *   * *****   * v      * *      * * v *
    *     *   *     ^   * ^      * *      * * * *
    * *** *   * ****v   * v      * *      v * * *
    * * * *   * *       * *      * *      ^ * * *
    * * * *   * *****   * *****  * *****  * *** *
    * * * *   *     *   *     *  *     *  **   **
    *** ***   *******   *****v^  *******   *****
    
    *wX ***    **3Xp    *rX4..   d5*      qd**  
    * 3 * *   **   v^   *    ..  * *      *  ***
    * v * ^   * #pX v   * ..  .  * *      *    **
    * *** v   * # r #   * ..  .  * *      * !q* *
    * * * *   * # v #   * 54 ..  * *      * * * *
    * * * *   * # * #   *   @X   * *      * * * *
    * * * *   * # * #   *   v    * *      * * * *
    * * * *   * # * #   * * **   * *      * * * *
    *  *  *   * # * #   * ** **  * *      * *** *
    *  *  *   * #v* ^   * *** *  * *****  *    **
    ** * **   **   *v   * * * *  *     *  *  ***
     *****     *v^**    *** ***  *******  **** 
    

    SPSS

    * SPSS Syntax
    * "Hello World" title in the Output Window of SPSS via SPSS Syntax.
    
    TITLE 'Hello World'.

    SQL-Advantage

    -- Hello World in SQL for Advantage Database
    
    select 'Hello World' from system.iota
    

    SQL-DB2

    -- Hello World in SQL for DB2
    VALUES('hello world')
    

    SQL-Oracle

    Back to index 
    # Hello World in SQL for Oracle
    
    SELECT 'Hello World' FROM dual;
    

    SQL

    # Hello World in SQL
    
    SELECT 'Hello World';
    

    Swift

    // Hello world in Swift
    
    println("Hello, world!")
    

    Tcl

    Back to index 
    #!/usr/local/bin/tclsh
    # Hello World in Tcl
    
    puts "Hello World!"
    
    

    TeX

    % Hello World in plain TeX
    immediatewrite16{Hello World!}
    end
    

    TI-59

    Hello World for the TI-59 with PC-100C thermo printer.
    No comment character exists.
    
    The TI-59/PC-100C can print up to 20 characters per line (upper case
    only). They are coded as 2-digit decimal numbers (see manual for
    details) in up to four print registers (of five characters each)
    and then printed.
    Before entering the program, press LRN to switch into learn mode.
    After entering the program, cancel learn mode with LRN, turn on the
    printer, and run the program with A.
    A pleasant sound, and what a font! Real TRUE-TYPE!
    
    The output looks like this:
      +--------------------+
      |        HELLO WORLD!|
      |                    |
      +--------------------+
    
    
      TI59 Code   Comment
    
      LBL A       Start of program: label A
      OP 00       Clear the four print registers
      23          "H"
      OP 02       Write into print register 2
      17          "E"
      27          "L"
      27          "L"
      32          "O"
      00          " "
      OP 03       Write into print register 3
      43          "W"
      32          "O"
      35          "R"
      27          "L"
      16          "D"
      73          "!"
      OP 04       Write into print register 4
      OP 05       Start printing
      ADV         Line feed (optional)
      R/S         End program
    

    Turing-Machine

    Hello World as a Turing machine.

    State Read Write Step Next state
    1 empty H > 2
    2 empty e > 3
    3 empty l > 4
    4 empty l > 5
    5 empty o > 6
    6 empty blank > 7
    7 empty W > 8
    8 empty o > 9
    9 empty r > 10
    10 empty l > 11
    11 empty d > 12
    12 empty ! > STOP

    Turing

    % Hello World in Turing
    put "Hello World!"

    TypeScript

    // Hello world in TypeScript
    
    alert('Hello world!');
    

    UniComal

    // Hello World in UniComal
    
    PRINT "Hello World"

    Unix-Shell

    # Hello World for the Unix shells (sh, ksh, csh, bash, ...)
    
    echo 'Hello World!'
    

    unlambda

    # Hello World in unlambda
    
    `r```````````.H.e.l.l.o. .w.o.r.l.di
    
    

    Vatical

    + Hello World in Vatical
    
    LITURGY:
        PRAY "Hello World!"
    AMEN.

    VAX-11-Macro

    ; Hello World in VAX-11 MACRO
    
            .title hello
    term_name:      .ascid /SYS$INPUT/
    term_chan:      .blkw 1
    out_iosb:       .blkq 1
    msg:    .asciz  /Hello, world!/
    
            .entry start,0
    
            ; establish a channel for terminal I/O
            $assign_s devnam=term_name,-
                    chan=term_chan
            blbc r0,error
    
            ; queue the I/O request
            $qio_s chan=term_chan,-
                    func=#io$_writevblk,-
                    iosb=out_iosb,-
                    p1=msg,-
                    p2=#13
            blbc r0,error
    
            $exit_s ; normal exit
    
    error:  halt ; error condition
    
            .end start

    VAX-Macro

    Hello World in VAX Macro.
    
            .title  helloworld
            .ident  /hello world/
    ;
            .library        /sys$library:lib/
            $libdef
            $lib$routinesdef
    
    
            .psect  $data,wrt,noshr,noexe,long
    
    hello:  .ascid  /Hello World!/
    
            .psect  $code,nowrt,shr,exe,long
    
            .entry  helloworld,^m<r9,r10,r11>
    
            pushaq  hello                   ; output the
    message
            calls   #1,g^lib$put_output     ;
    
            ret                             ; GTFOH
            .end    helloworld              ;
    

    VBA (Excel)

    ' Hello world in Visual Basic for Applications, Excel version
    
    Private Sub Workbook_Open()
        MsgBox "Hello world!"
    End Sub

    VBA (Word)

    ' Hello world in Visual Basic for Applications, Word version
    
    Private Sub Document_Open()
        MsgBox "Hello world!"
    End Sub

    VBScript

    ' Hello World in VBScript (Windows Scripting Host)
    msgbox "Hello, World!"

    Velocity

    <HTML>
    <!-- Hello World in Velocity -->
    <BODY>
      #set( $foo = "Hello World" )
      $foo
    </BODY>
    </HTML>

    Verilog

    /* Hello World in Verilog. */
    
    module main;
    
     initial
       begin
         $display("Hello, World");
         $finish ;
       end
    
     endmodule

    Vexi

    <vexi xmlns:ui="vexi://ui">
        <ui:box framewidth="200" frameheight="100">
            <ui:box text="Hello World!" />
            vexi.ui.frame = thisbox;
        </ui:box>
    </vexi>
    

    VHDL

    
    ENTITY helloworld IS
    END helloworld;
    
    ARCHITECTURE hw OF helloworld IS
    
    BEGIN
    
    ASSERT FALSE
    REPORT "HELLO, WORLD!"
    SEVERITY NOTE;
    
    END hw;

    Vim script

    " Hello world in Vim script
    
    :echom "Hello world!"

    Visual-FoxPro

    Back to index 
    *Hello World in Microsoft Visual FoxPro 5-9
    ? "Hello World!"
    

    VisualBasic

    Begin Form Form1
       Caption         =   "Form1"
       ClientHeight    =   6096
       ClientLeft      =   936
       ClientTop       =   1572
       ClientWidth     =   6468
       Height          =   6540
       Left            =   876
       LinkTopic       =   "Form1"
       ScaleHeight     =   6096
       ScaleWidth      =   6468
       Top             =   1188
       Width           =   6588
       Begin Label Label1
          Caption         =   "Hello World!"
          Height          =   372
          Left            =   2760
          TabIndex        =   0
          Top             =   2880
          Width           =   972
       End
    End
    Option Explicit

    VisualBasic.NET

    'Hello World in Visual Basic .NET (VB.NET)
    
    Imports System.Console
    
    Class HelloWorld
    
        Public Shared Sub Main()
            WriteLine("Hello, world!")
        End Sub
    
    End Class

    VisualBasic6

    ' Hello World in Visual Basic 6
    
    Private Sub Form_Load()
    Print "Hello World"
    End Sub

    VisualProlog

    
    /* Hello World in Visual Prolog */
    
    goal
        console::init(),
        stdio::write("Hello World!").
    
    VisualWorksSmalltalk 
    
    "Hello World! in VisualWorks Smalltalk"
    
    Dialog warn: 'Hello World!'.
    

    VMS-DCL

    $ ! Hello World in Digital Command Language for the VMS operating system
    
    $ WRITE SYS$OUTPUT "Hello World!"
    

    VRML

    
    Shape
            {
            geometry Text
                    {string "Hello World!"}
            }

    VSL

    /* "hello, world" in VSL (the script language of Virtools),
    to be used in a "Run VSL" building block */
    
    void main()
    {
        bc.OutputToScreen("hello, world");
    }

    VVVV

    Hello World in VVVV

    Whirl

    Hello World in Whirl. This language has no comments.
    110001100111000111110000010001111100011000000000110000011100000110000010000
    011000111100000111110000011100001111100100011001110000111111100001001111100
    011000000000110000011000111110001000000000000000000001001111110000111111000
    100000000000000000000000000011111000100100000000111111000100000000000001001
    000011111000001110000111110010001100011000000100010000011000000000000000001
    100000111001111100111111000100111001111000011100010011111110000111000110000
    000000000000000000000000000001000100001111100000111000011111001100011100000
    111000000010001111100000111110001000000000111000110000000000000000000000000
    000000100100001111100000111000011100010000000000000100010000111110001110001
    111100111111000011100001100111000111000000000001111100000111000110000110110
    001000000000010000001111100000111000011111000000010001110000000000000000000
    000000000000100000011111000001100

    Whitespace

    Hello #World #in #Whitespace    * # #   * # # #
    +   *[Space]
    + #is #marked #with"#" # #[tab] #with"*"    *line-feed #with #"+"   * # *so
    +it #would
    +be #easier #to #write #again... #All   *the    *non-whitespace-characters #are *ignored... * # #
    +   *
    + # # # # # *   * # *   * # #
    +   *
    + # # # # # *   * # *   *   *   *
    +   *
    + # # # # # * # # # # #
    +   *
    + # # # # # * # * # *   *   *
    +   *
    + # # # # # *   * # *   *   *   *
    +   *
    + # # # # # *   *   * # #   * #
    +   *
    + # # # # # *   * # *   * # #
    +   *
    + # # # # # *   * # #   * # #
    +   *
    + # # # # # * # # # #   *
    +   *
    + # # # # # * # * #
    +   *
    + # #
    +
    +
    +

    wml

    #define HELLOWORLD 
    [message] 
    speaker="narrator" 
    message=_"Hello World" 
    [/message]
     #enddef

    WSH

    // Hello World for the Windows Scripting Host
    WScript.Echo("Hello World!");
    
    

    X++

    
    class classHelloWorld
    {
    }
    
    static void main(args Args)
    {
        dialog   dialog;
        ;
        dialog = new dialog();
        dialog.addText("Hello World!");
        dialog.run();
    }

    Xbase++

    
    Hello World in Xbase++
    func Main()
      Qout("Hello World!")
    return 1

    xblite

    ' Hello World in xblite, Windows GUI mode
    
        IMPORT "gdi32"
        IMPORT "user32"
    
    DECLARE FUNCTION Entry ()
    
    FUNCTION Entry ()
        MessageBoxA (0, &"Hello World!", &"Hello World Window", $$MB_OK)
    END FUNCTION
    END PROGRAM
    

    XHTML

    <?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>
    to helloworld
     resetall
     hideturtle
     fd 20 left 180
     fd 40 left 180
     fd 20 right 90
     fd 20 left 90
     fd 20 left 180
     fd 40 left 90
     fd 20 left 90
     fd 20 right 90
     fd 20 right 90
     fd 10 right 90
     fd 20 left 90
     fd 10 left 90
     fd 30 left 90
     fd 40 left 180
     fd 40 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 60 left 90
     fd 40 left 180
     fd 40 left 90
     fd 20 left 90
     fd 20 left 180
     fd 20 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 40 left 90
     fd 20 right 90
     fd 20 right 90
     fd 5  left 90  
     fd 5  left 90  
     fd 25 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40
    end
    

    XML

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="HelloWorld.xsl" ?>
    <!-- Hello World in XML -->
    <text><string>Hello, World</string></text>
    

    XQuery

    (: Hello World with XQuery :)
    let $i := "Hello World"
    return $i

    XSL-FO

    
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Hello World in XSL-FO -->
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
        <fo:layout-master-set>
            <fo:simple-page-master master-name="LetterPage" page-width="8.5in" page-height="11in">?
                <fo:region-body region-name="PageBody" margin="0.7in"/>
            </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="LetterPage">
            <fo:flow flow-name="PageBody">
                <fo:block font-size="12pt" font-family="courier">Hello, World</fo:block>
            </fo:flow>
        </fo:page-sequence>
    </fo:root>

    XSLT

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Hello World in XSLT -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="/">
            <xsl:text>Hello World!</xsl:text>
        </xsl:template>
    </xsl:stylesheet>
    

    XUL

    <?xml version="1.0"?>
    <!-- Hello World in XUL -->
    <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <label value="Hello World!"/>
    </window>

    Yacas

    Hello World in Yacas
    
    WriteString("Hello World")

    ZIM

    % Hello World in ZIM (database and development language)
    
    out "Hello World"
  • 相关阅读:
    css 样式合集
    java-TheadPoolExecutor
    ConcurrentHashMap
    java线程
    hadoop 笔记
    java中的锁
    关闭防火墙
    hadoop集群搭建
    ssh免密码登录
    pyrhon 技巧 解析pymysql查询结果,取mysql其中的某一列数据 zip解压
  • 原文地址:https://www.cnblogs.com/NoMasp/p/4483257.html
Copyright © 2020-2023  润新知