LabVIEW портал

  • Увеличить размер шрифта
  • Размер шрифта по умолчанию
  • Уменьшить размер шрифта

Коллекция Hello World-ов

Интересная подборочка.Smile
Я кстати грешным делом уже подумал что G-code на самом деле и есть тот пресловутый язык G, однако нет, это какой то древний язык программирования для станков с ЧПУ.  Кстати в поле LabVIEW ничего нет, что еще раз подтверждает, что это самый быстрый язык для разработок Laughing Отчасти это верно, так как текста программы то для этого действительно не надо вводить никакого))

C++-Epoc

 

// Hello World in C++, Epoc style (for Symbian OS)

#include
#include
#include

class CHelloWorldAppUi;
class CEikApplication;
class CHelloWorldAppView;

class CHelloWorldApplication : public CEikApplication
{
public:
TUid AppDllUid() const;
protected:
CApaDocument* CreateDocumentL();
};

class CHelloWorldDocument : public CEikDocument
{
public:
static CHelloWorldDocument* NewL(CEikApplication& aApp);
static CHelloWorldDocument* NewLC(CEikApplication& aApp);
~CHelloWorldDocument(){};
public:
CEikAppUi* CreateAppUiL();
private:
void ConstructL() {};
CHelloWorldDocument(CEikApplication& aApp){};
};

class CHelloWorldAppUi : public CEikAppUi
{
public:
void ConstructL();
CHelloWorldAppUi(){};
~CHelloWorldAppUi(){};
};

static const TUid KUidHelloWorldApp = {0x10005B91};

GLDEF_C TInt E32Dll(TDllReason )
{
return KErrNone;
}

EXPORT_C CApaApplication* NewApplication()
{
return (new CHelloWorldApplication);
}

CApaDocument* CHelloWorldApplication::CreateDocumentL()
{
CApaDocument* document = CHelloWorldDocument::NewL(*this);
return document;
}

TUid CHelloWorldApplication::AppDllUid() const
{
return KUidHelloWorldApp;
}

CHelloWorldDocument* CHelloWorldDocument::NewL(CEikApplication& aApp)
{
CHelloWorldDocument* self = NewLC(aApp);
CleanupStack::Pop(self);
return self;
}

CHelloWorldDocument* CHelloWorldDocument::NewLC(CEikApplication& aApp)
{
CHelloWorldDocument* self = new (ELeave) CHelloWorldDocument(aApp);
CleanupStack::PushL(self);
self->ConstructL();
return self;
}

CEikAppUi* CHelloWorldDocument::CreateAppUiL()
{
CEikAppUi* appUi = new (ELeave) CHelloWorldAppUi;
return appUi;
}

void CHelloWorldAppUi::ConstructL()
{
BaseConstructL();

_LIT(message,"Hello!");
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->ExecuteLD(message);
}

C++-ISO

 

// Hello World in ISO C++

#include

int main()
{
std::cout << "Hello World!" << std::endl;
}

C++-MFC

 

// Hello World in C++ for Microsoft Foundation Classes
// (Microsoft Visual C++).

#include

class CHello : public CFrameWnd
{
public:
CHello()
{
Create(NULL,_T("Hello World!"),WS_OVERLAPPEDWINDOW,rectDefault);
}
};

class CHelloApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};

BOOL CHelloApp::InitInstance()
{
m_pMainWnd = new CHello();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}

CHelloApp theApp;

C++-Qt

 

// Hello World in C++ for the Qt framework

#include
#include

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QLabel l("Hello World!", 0);
l.setCaption("Test");
l.setAlignment(Qt::AlignCenter);
l.resize(300, 200);
a.setMainWidget(&l);
l.show();
return(a.exec());
}

C-Ansi

 

/* Hello World in C, Ansi-style */

#include
#include

int main(void)
{
puts("Hello World!");
return EXIT_SUCCESS;
}

C-Curses

 

/* Hello World in C for Curses */

#include
main()
{
initscr();
addstr("Hello World!\n");
refresh();
endwin();
return 0;
}

C-GEM

 

/* Hello World for C with GEM */

#include
main()
{
appl_init();
form_alert(1,"[0][Hello World!][Ok]");
appl_exit();
return 0;
}

C-Intuition

 

/* Hello World in C for Intution (Amiga GUI) */

#include

struct IntuitionBase *IntuitionBase = NULL;

struct IntuiText hello_text = {-1,-1,JAM1,0,0,NULL,"Hello World!",NULL };
struct IntuiText ok_text = {-1,-1,JAM1,0,0,NULL,"Ok",NULL };

void main(void)
{
IntuitionBase = (struct IntuitionBase *)
OpenLibrary("intuition.library", 0);
AutoRequest(NULL, &hello_text, NULL, &ok_text, NULL, NULL, 100, 50);
CloseLibrary(IntuitionBase);
}

C-K+R

 

/* Hello World in C, K&R-style */

main()
{
puts("Hello World!");
return 0;
}

C-Objective

 

/* Hello World in Objective-C.
** Since the standard implementation is identical to K&R C,
** a version that says hello to a set of people passed on
** the command line is shown here.
*/

#include
#include
int main(int argc,char **argv)
{
id set = [Set new];
argv++;while (--argc) [set add:[String str:*argv++]];
[set do:{ :each | printf("hello, %s!\n",[each str]); }];
return 0;
}

C-PresManager

 

/* Hello World for C with PresentationManager / OS/2 2.11  */

#define INCL_WIN

#include

int main( void )
{
HMQ hmq;

hmq = WinCreateMsgQueue( 0, 0 );

WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, (PSZ)"Hello World!",
(PSZ)"", 0, MB_OK );

WinDestroyMsgQueue( hmq );

return 0;
}

C-Sharp

 

// Hello World in Microsoft C# ("C-Sharp").

using System;

class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Hello, World!");
return 0;
}
}

C-Windows

 

/* Hello world in C for MS-Windows */

#include

int PASCAL WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR CmdLine, int Show)
{
MessageBox(GetActiveWindow(), "Hello World!", "Hello Windows World", MB_OK);
return 0;
}

C-X11-Athena

 

/* Hello World in C with X11 using Athena widgets */

#include
#include
#include

main(int argc,char **argv)
{
XtAppContext app_context;
Widget toplevel,hello;

toplevel = XtVaAppInitialize(&app_context,"XHello",NULL,0,
&argc,argv,NULL,NULL);
hello = XtVaCreateManagedWidget("Hello World!",labelWidgetClass,
toplevel,(void*)0);

XtRealizeWidget(toplevel);

XtAppMainLoop(app_context);
return 0;
}

CAML-Light

 

(* Hello World in CAML Light *)

let hello =
print_string "Hello World!";
;;

Clean

 

// Hello World in Clean

module hello

Start :: String
Start = "Hello World!\n"

Clipper

 

// Hello World in Clipper

@ "Hello World"

Cobol

 

       * Hello World in Cobol

*****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY "Hello World!"
STOP RUN.
****************************

Cocoa

 

// Hello World in Cocoa Obj-C (OS X)

#import

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

NSLog(@"Hello, World!");
[pool release];
return 0;
}

CommandScript

 

#Hello World in Command Script 3.1
#Meta.Name: "Hello World"

#Block(Main).Start
echo "Hello World!"
#Block(Main).End

D

 

// Hello World in D

void main()
{
printf("Hello World!\n");
}

Darkbasic

 

` Hello World in Darkbasic

print "Hello World!"
wait key

Dataflex

 

// Hello World in Dataflex Procedural

/tela

Hello world

/*

clearscreen

page tela

dBase

 

* Hello World in dBase IV

? "Hello World!"

dc

 

#!/usr/bin/dc
# Hello world! in dc (Unix desk calculator)
[Hello world!]p

Delphi

 

// Hello World in Delphi
Program Hello_World;

{$APPTYPE CONSOLE}

Begin
WriteLn('Hello World');
End.

Dialect

 

# Hello World in Dialect

print "Hello World"

DML

 

! Hello World in DML (Gembase database language)

PROCEDURE_FORM MAIN
PRINT/NOWAIT ("Hello world")
END_FORM

Dylan

 

module:            hello-world
author: Homer
copyright: (c) 1994 Homer
version: 1.0

// Hello World in DYLAN

define method main (#rest args)
princ("Hello world!");
end;

main();

DynaMorph

 

<>
<#setString foo {Hello World!}#>


DynaMorph


<#getString foo#>



Eiffel

 

indexing "Hello World in Eiffel"

class HELLO

creation
run

feature

run is
local
io : BASIC_IO;
do
!!io;
io.put_string("Hello World!");
io.put_newline;
end; -- run

end; -- class HELLO

Elan

 

(* Hello World in ELAN *)

putline ("Hello World!");

Erlang

 

%% Hello World in Erlang

-module(hello).

-export([hello/0]).

hello() ->
io:format("Hello World!~n", []).

Euphoria

 

-- Hello World in Euphoria

puts(1, "Hello World!\n")

Focal

 

1.01 COMMENT HELLO WORLD IN FOCAL
1.02 TYPE "HELLO WORLD", !
1.03 QUIT

Forth

 

' Hello World in Forth

: HELLO
." Hello World!" CR
;

Fortran

 

C     Hello World in Fortran

PROGRAM HELLO
WRITE (*,100)
STOP
100 FORMAT (' Hello World! ' /)
END

Fortran77

 

C     Hello World in Fortran 77

PROGRAM HELLO
PRINT*, 'Hello World!'
END

FortranIV

 

       PROGRAM HELLO
c
C Hello World in Fortran IV (supposedly for a TR440)
c
WRITE (6,'('' Hello World!'')')
END

Frink

 

// Hello World in Frink

println["Hello World!"]

G-Code

Hello World in "G Code" for CNC machines.

Click here for a preview.

%
O1000
(PROGRAM NAME - HELLOWORLD)
(DATE=DD-MM-YY - 30-06-05 TIME=HH:MM - 19:37)
N10G20
N20G0G17G40G49G80G90
/N30G91G28Z0.
/N40G28X0.Y0.
/N50G92X0.Y0.Z0.
( 1/16 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .0625)
(CONTOUR)
N60T1M6
N70G0G90X0.Y1.A0.S5000M3
N80G43H1Z.5
N90Z.25
N100G1Z-.005F2.
N110Y0.F20.
N120G0Z.5
N130X.5
N140Z.25
N150G1Z-.005F2.
N160Y1.F20.
N170G0Z.5
N180Y.6106
N190Z.25
N200G1Z-.005F2.
N210X0.F20.
N220G0Z.5
N230X.6157Y.4712
N240Z.25
N250G1Z-.005F2.
N260X.6039Y.4135F20.
N270X.6Y.351
N280X1.1
N290G3X1.0098Y.6202R.4333
N300X.8941Y.6971R.2625
N310X.7255Y.6538R.1837
N320X.6157Y.4712R.332
N330G0Z.5
N340X.6Y.351
N350Z.25
N360G1Z-.005F2.
N370X.6039Y.2885F20.
N380G3X.7255Y.0481R.385
N390X.9745R.1853
N400X1.0843Y.2308R.332
N410G0Z.5
N420X1.2039Y0.
N430Z.25
N440G1Z-.005F2.
N450Y1.F20.
N460G0Z.5
N470X1.3098
N480Z.25
N490G1Z-.005F2.
N500Y0.F20.
N510G0Z.5
N520X1.4706Y.125
N530Z.25
N540G1Z-.005F2.
N550X1.502Y.0817F20.
N560G3X1.6176Y.0048R.2625
N570X1.7863Y.0481R.1837
N580X1.9118Y.351R.3957
N590X1.8216Y.6202R.4333
N600X1.7059Y.6971R.2625
N610X1.5373Y.6538R.1837
N620X1.4157Y.4135R.358
N630X1.4706Y.125R.4611
N640G0Z.5
N650X1.9853Y0.
N660Z.25
N670G1Z-.005F2.
N680X2.0422Y.1442F20.
N690G0Z.5
N700X2.5706Y1.
N710Z.25
N720G1Z-.005F2.
N730X2.6961Y0.F20.
N740X2.8216Y1.
N750X2.9451Y0.
N760X3.0706Y1.
N770G0Z.5
N780X3.2961Y.6538
N790Z.25
N800G1Z-.005F2.
N810X3.2608Y.6202F20.
N820G3X3.1745Y.2885R.4408
N830X3.2961Y.0481R.385
N840X3.5451R.1853
N850X3.6706Y.351R.3957
N860X3.5804Y.6202R.4333
N870X3.4647Y.6971R.2625
N880X3.2961Y.6538R.1837
N890G0Z.5
N900X3.7461Y.7019
N910Z.25
N920G1Z-.005F2.
N930Y0.F20.
N940G0Z.5
N950Y.3654
N960Z.25
N970G1Z-.005F2.
N980X3.7637Y.4663F20.
N990G2X3.8422Y.6587R.4948
N1000X3.9167Y.7019R.0929
N1010G1X4.0755
N1020G2X4.15Y.6587R.0929
N1030X4.1951Y.5769R.246
N1040G0Z.5
N1050X4.3255Y1.
N1060Z.25
N1070G1Z-.005F2.
N1080Y0.F20.
N1090G0Z.5
N1100X4.9275
N1110Z.25
N1120G1Z-.005F2.
N1130Y1.F20.
N1140G0Z.5
N1150X5.0314
N1160Z.25
N1170G1Z-.005F2.
N1180Y.2981F20.
N1190G0Z.5
N1200X4.9275Y.274
N1210Z.25
N1220G1Z-.005F2.
N1230X4.8941Y.1731F20.
N1240G2X4.7627Y.0192R.3255
N1250X4.5529Y.0481R.1862
N1260X4.4314Y.2885R.358
N1270X4.5176Y.6202R.4408
N1280X4.6333Y.6971R.2625
N1290X4.802Y.6538R.1837
N1300X4.8941Y.5288R.3457
N1310G1X4.9275Y.4279
N1320G0Z.5
N1330X5.0314Y.149
N1340Z.25
N1350G1Z-.005F2.
N1360Y0.F20.
N1370G0Z.5
N1380M5
N1390G91G28Z0.
N1400G28X0.Y0.A0.
N1410M30
%

 


Gentee

 

// Hello World in Gentee

func hello

{
print( "Hello, World!" )
getch()
}

Gofer

 

-- Hello World in Gofer
-- Simple version

helloWorld:: String
helloWorld = "Hello World!\n"


-- Hello World in Gofer
-- Dialog version

helloWorld :: Dialogue
helloWorld resps = [AppendChan stdout "Hello world!"]

Groovy

 

// Hello World in Groovy

println "Hello World"

GynkoSoft

 

; Hello World in GynkoSoft
; Simple version
0.00 Protocol "Hello, World!"


; Hello World in GynkoSoft
; Dialog box output
0.00 Message "Hello, World!"

Haskell

 

-- Hello World in Haskell

module Main where
main = putStrLn "Hello world!"

HDX

 

# Hello World as bdehaldia.exe external command

proc hdx_info {} {
set ::Titel "&Hello World"
set ::Menu GMA
}

proc hdx_run {} {
tk_messageBox -type ok -message "Hello World!"
destroy .
}

HP-41C

 

Hello World for the HP 41C. No comment character exists.

01 LBL "HELLO"
02 "HELLO WORLD"
03 AVIEW

HP-48

 

<<
@ Hello World for the HP-48
@ << and >> are one char each
"HELLO WORLD"
>>

HTML

 




Hello World!


Hello World!



Human

Hello World in human languages.

Czech Ahoj Světe!
Bengali Shagatam Prithivi!
Brazilian Portuguese Oi mundo!
Bulgarian (Zdrav'ei svi'at)
Catalan Hola mуn!
Dutch Hallo, wereld!
English Hello World!
Finnish Hei maailma!
French Salut le Monde!
Frisian Hallo, wrвld!
German Hallo Welt!
Hebrew (Shalom Olam)
Hindi Shwagata Prithvi!
Italian Ciao Mondo!
Japanese (konnichiwa sekai)
Malagasy Manao ahoana ry tany!
Norwegian Hallo Verden!
Portuguese Ola mundo!
Russian (Zdra'vstvuj mi'r)
Slovak Ahoj, svet!
Spanish ¡Hola mundo!
Swedish Hejsan värld!
Turkish Merhaba Dünya!
Ukrainian (Pryvi't svi'te)

 

 


HyperTalk

 

-- Hello World in HyperTalk

answer "Hello, world!"

IBM-Exec

 

Hello World for IBM EXEC (under VM/CMS)

&CONTROL
*
&TYPE Hello World!
*
&EXIT 0

IBM-Exec2

 

Hello World for IBM EXEC2 (under VM/CMS)

&TRACE OFF
*
&TYPE Hello World!
*
&EXIT 0

ici

 

# Hello World in ici (http://www.zeta.org.au/~atrn/ici/)
printf("Hello World!\n");

Icon

 

# Hello world in Icon (http://www.cs.arizona.edu/icon/)

procedure main()
write("Hello world")
end

IDC

 

// Hello World in IDC-script language for IDA disaasembler

#include

static main(void)
{
Message("Hello World!");
}

Inform

 

!  "Hello world" in Inform
[ Main;
print "Hello world^";
];

Informix-4GL

 

# Hello World in Informix 4GL

MAIN

DISPLAY "Hello World"

END MAIN

InstallScript

 

// Hello World in InstallScript
// (Scripting language of InstallShield, a Windows install generator)

program
MessageBox("Hello World!",INFORMATION);
endprogram

Intercal

 

      HELLO WORLD IN INTERCAL NOT FORTRAN

HELLO WORLD

Java

 

// Hello World in Java

class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}

Java-Mobile

 

// Hello World on a mobile Java device

package helloworld;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class HelloWorld extends MIDlet {

public HelloWorld()
{
Form form = new Form("Hello World");
form.append("Hello world!");
Display.getDisplay(this).setCurrent(form);
}

protected void pauseApp() { }
protected void startApp() throws
javax.microedition.midlet.MIDletStateChangeException { }
protected void destroyApp(boolean parm1) throws
javax.microedition.midlet.MIDletStateChangeException { }
}

Java-Server-Pages

 



<%@ page language='java' %>
<%="Hello World!" %>

Java-Servlet

 

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

//
// Hello World Java Servlet
//
public class HelloWorld extends HttpServlet {
public void service(HttpServletRequest request,
HttpServletResponse response)
throws IOException {

response.setContentType("text/html");
PrintWriter out = response.getWriter();

out.println("");
out.println("Hello World!");
out.println("");
}
}

Java-Swing

 

// Hello World in Java using Swing GUI

class HelloWorldSwing {
static public void main(String args[]) {
javax.swing.JOptionPane.showMessageDialog(null,"Hello world!");
}
}

JavaScript

 







JCL

 

//HERIB    JOB  ,'HERIBERT OTTEN',PRTY=12
//* Hello World for MVS
//HALLO EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=T
//SYSUT1 DD *
Hello World!
/*
//

JudoScript

 

// Hello World in JudoScript (a Java scripting layer)

. "Hello World";

LabVIEW

 


Limbo

 

Hello World in Limbo.
Limbo is the programming language of the Inferno OS
(from Lucent Bell Labs).


implement Cmd;

include "sys.m";
include "draw.m";

Cmd : module {
init : fn (ctxt : ref Draw->Context, args : list of string);
};

init(nil : ref Draw->Context, nil : list of string)
{
sys := load Sys Sys->PATH;
sys->print("Hello World\n");
}

Lingo

 

Hello World in Lingo (Macromedia Director)

on startmovie
alert "Hello World"
end

Lisp

 

;;; Hello World in Common Lisp

(defun helloworld ()
(print "Hello World!")
)

Lisp-Emacs

 

;;; Hello World in Emacs Lisp.

(defun hello-world()
"Display the string hello world."
(interactive)
(message "hello world"))

Logo

 

; Hello World in Logo

DRUCKEZEILE [Hello World!]

Logo-graphical

 

; Hello World in LOGO, graphical output.

go 20 , left 180,
go 40 , left 180,
go 20 , right 90,
go 20 , left 90 ,
go 20 , left 180,
go 40 , left 90 ,
go 20 , left 90 ,
go 20 , right 90 ,
go 20 , right 90 ,
go 10 , right 90 ,
go 20 , left 90 ,
go 10 , left 90 ,
go 30 , left 90 ,
go 40 , left 180,
go 40 , left 90 ,
go 20 , left 90 ,
go 40 , left 180,
go 40 , left 90 ,
go 40 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 60 , left 90 ,
go 40 , left 180,
go 40 , left 90 ,
go 20 , left 90 ,
go 20 , left 180,
go 20 , left 90 ,
go 20 , left 90 ,
go 40 , left 180,
go 40 , left 90 ,
go 40 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 40 , left 90 ,
go 20 , right 90,
go 20 , right 90,
go 5 , left 90 ,
go 5 , left 90 ,
go 25 , left 180,
go 40 , left 90 ,
go 40 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 20 , left 90 ,
go 40 , left 180,
go 40 ,

lua

 

# Hello World in lua

print "Hello world"

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

MAMASH

 

/* Hello World in MAMASH */

TQWD LGYEA NXKIA HELLO_WORLD )1(

DWLH CXBZ_YKX

ID& HELLO_WORLD YED 'HELLO WORLD' .

Mathematica

 

(* Hello World in Mathematica *)

Hello[] := Print["Hello, World!"]

MATLAB

 

% Hello World in MATLAB.

disp('Hello World');

MEL

 

// Hello World in MEL scripting language for Alias Maya

proc helloWorld () {
print "Hello World!\n";
}

helloWorld;

mIRC

 

; Hello World! for mIRC

echo Hello World!

Modula-2

 

(* Hello World in Modula-2 *)

MODULE HelloWorld;
FROM InOut IMPORT WriteString,WriteLn;
BEGIN
WriteString("Hello World!");
WriteLn;
END HelloWorld.

MPD

 

# Hello World in MPD.

resource helloworld()
write("Hello World")
end

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
}
}

Mumps

 

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

Natural

 

 * Hello World in Natural (by Software AG)
FORMAT AD=M
DISPLAY 'Hello World!'
END

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

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

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

взято тут



Add this page to your favorite Social Bookmarking websites
 
 

Комментарии  

 
0 #1 Евгений Граф 15.02.2010 11:03
Картинка с кодом LabVIEW почему то не показывается :whistle:
Цитировать
 

Добавить комментарий


Защитный код
Обновить

Внимание! Регистрация в портале и в форуме раздельная.