文档章节

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

NoMasp
 NoMasp
发布于 2015/09/08 21:46
字数 3470
阅读 104
收藏 0

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!\n";
}

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!\n");
}

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!\n");
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!\n";;

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\n");

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!\n";

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!\n");
}

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\n", 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!\n" 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
\immediate\write16{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>

XLogo

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"

版权声明:本文为 NoMasp柯于旺 原创文章,未经许可严禁转载!欢迎访问我的博客:http://blog.csdn.net/nomasp

本文转载自:http://blog.csdn.net/nomasp/article/details/45374263

NoMasp
粉丝 7
博文 334
码字总数 0
作品 0
镇江
程序员
私信 提问
加载中

评论(0)

我所知道的C语言

C简介:C是一种通用的高级语言,最初是由丹尼斯.里奇在实验室为开发UNIX操作系统而设计的。C语言最早始于1972年在计算机上被首次实现。1978年制作了C语言的一个公开可用描述,现在被称为R&B...

crystalx静
2017/04/24
0
0
Linux操作系统之Shell程序设计

Shell是种命令解释程序,也可以看作是一种命令语言的解释器。 用户在与Shell交互时所输入的命令行必须符合Shell命令的语法和语义规范,才能够被Shell理解并执行。Shell所使用的这种命令语言称...

Linux就该这么学
2019/06/20
52
0
Zk Mobile

ZK Mobile Computing 是ZK的扩展,可以使ZK应用程序扩展到移动设备,而只需少量的编程。 ZK Mobile Computing由两部分组成。在移动设备方面为ZK Mobile,一个JavaMe Midlet 瘦客户端,与ZK服...

匿名
2008/10/05
3.4K
0
【猿传奇 | 17】首次引用了“hello,world”的程序员是谁?

当你学习一门新的编程语言时,不论是前端还是后端,移动开发还是桌面开发,第一个编写的程序永远都是经典的“hello,world”,那么到底“hello,world”的说法从何而来,又是怎么开始流行起来的...

蒲公英开发者服务平台
2019/04/15
0
0
介绍一个基于 Java 的并发编程语言 —— JR

JR 是一种专为解决并行编程问题的编程语言。JR 是在 Java 语言的基础上增加了并行编程(例如进程和信号量等)概念的一个新的语言。 JR 经常在学校中用来教授并行编程课程。 在本文中我们主要...

红薯
2010/06/28
1.4K
3

没有更多内容

加载失败,请刷新页面

加载更多

 企业信息平台的快速搭建,框架如何选?

Web端开发框架如何选 目前,大部分的企业信息集成系统都在web端运行,而搭建框架的选择对一个企业的发展至关重要,不过其最终目的都是要符合企业发展逻辑,助力企业战略的实施。 而在框架的选...

我想造火箭
30分钟前
32
0
安装mysql 实操截图

前言: CentOS 7 版本将MySQL数据库软件从默认的程序列表中移除,用MariaDB代替了,MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之...

冥焱
34分钟前
57
0
FecMall 多商户分销系统 - 价格公式计算

FecMall Fecbdc 分销价格公式计算 本章详解讲述分销平台的各个价格,以及相应的设置,本章节非常重要,贯穿分销系统的整个流程,请仔细阅读 官网: http://www.fecmall.com/ 业务逻辑设计 系...

FecShop
35分钟前
33
0
Java Web 学习笔记(7)

文件下载 package com.janeroad.servlet;import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.......

JaneRoad
39分钟前
41
0
如何在JavaScript中更改span元素的文本

如果我有跨度,请说: <span id="myspan"> hereismytext </span> 如何使用JavaScript将“ hereismytext”更改为“ newtext”? #1楼 对于现代浏览器,您应该使用: document.getElementByI......

技术盛宴
41分钟前
46
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部