Hello World
Ada
with TEXT_IO;
procedure HELLO is
begin
TEXT_IO.PUT_LINE ("Hello, world!");
end HELLO;
For explanation see Ada Programming:Basic.
ALGOL 68
In the popular upper-case stropping convention for bold words:
BEGIN
printf($"Hello, world!"l$)
END
or using prime stropping suitable for punch cards on 6 bit character platforms:
'BEGIN'
PRINTF($"HELLO, WORLD!"l$)
'END'
or minimally using the "brief symbol" form of begin and end.
( printf($"Hello, world!"l$) )
Delphi, Kylix
program Hello_World;
uses
QDialogs;
begin
ShowMessage('Hello, world!');
end.
FORTRAN
program hello
print*, 'Hello, world!'
end
Modula-2
MODULE Hello;
FROM InOut IMPORT WriteLn, WriteString;
BEGIN
WriteString ("Hello, world!");
WriteLn
END Hello.
Pascal
program hello;
begin
Writeln('Hello, world!');
end.
SPARK
with Spark_IO;
--# inherit Spark_IO;
--# main_program;
procedure Hello_World
--# global in out Spark_IO.Outputs;
--# derives Spark_IO.Outputs from Spark_IO.Outputs;
is
begin
Spark_IO.Put_Line (Spark_IO.Standard_Output, "Hello, world!", 0);
end Hello_World;
Simula
BEGIN
OutText("Hello, world!");
OutImage;
END
Smalltalk
Transcript show: 'Hello, world!'
See also TUI section.
Evaluate in a workspace:
Dialog confirm: 'Hello, world!'
Using the Morphic GUI toolkit of Squeak Smalltalk:
('Hello, world!' asMorph openInWindow) submorphs second color: Color black
Using wxSqueak:
Wx messageBox: 'Hello, world!'
Podobne strony
Podobne Strony • Wieża hanoi • wyswietlanie liczby calkowitej metodą odejmowania poteg • Parzysta Nieparzysta • Ruchoma Gwiazdka • Sortowanie Przez Wstawianie • Metoda Babelkowa • Miejsca Zerowe Funkcji Kwadratowej • Fibonacci
wersja strony: 1, ostatnia edycja: 21 Jul 2009 07:22