“Hello World” é la frase che storicamente si usa per iniziare ad imparare un nuovo linguaggio di programmazione: creare una prima applicazione che semplicemente scrive sullo schermo “Hello World” é il punto di partenza per diventare un vero guru 🙂
Sembra che la prima applicazione “Hello World” fu scritta nel 1966 da Martin Richards (Cambridge University), durante lo sviluppo di BCPL (Basic Combined Programming Language).
Qui c’é una lista di 101 applicazioni in 101 diversi linguaggi di programmazione (o di scripting) che fanno una cosa sola: un semplice… “Hello World”. La mia sintassi preferita é quella di BrainFuck 🙂
PS: una lista *maggiormente* comprensiva si può trovare a “The Hello World Collection“, con più di 300 diverse applicazioni (e più di 50 modi per dire “Hello World” in linguaggio umano).
Da Console
* ABAP
write ‘Hello World!’.
* Ada
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line (“Hello World!”);
end Hello;
* ALGOL
‘BEGIN’
OUTSTRING(2,'(‘HELLO, WORLD’)’);
‘END’
* APL
‘Hello, World!’
* ASP 3.0
<%
Response.Write(“Hello, World!”)
%>
* Assembly
IDEAL
MODEL SMALL
STACK 100h
DATASEG
HW DB “hello, world”, 13, 10, ‘$’
CODESEG
Begin:
MOV AX, @data
MOV DS, AX
MOV DX, OFFSET HW
MOV AH, 09H
INT 21H
MOV AX, 4C00H
INT 21H
END Begin
* awk
BEGIN { print “Hello World!” }
* Bash
#!/bin/bash
echo “Hello World!”;
* BASIC
BASIC (traditional):
10 PRINT “Hello World!”
20 END
BASIC (modern):
print “Hello World!”
* BasicAlgorytm
%write “Hello World!”
* BCPL
GET “LIBHDR”
LET START () BE
$(
WRITES (“Hello World!*N”)
$)
* BeanShell
print(“Hello World!”);
* Brainfuck
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++.+++++++++++++++++++++++++++++.+++++++..+++.————–
—————————————————–.———–
-.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++.——–.+++.——.——–.———–
——————————————————–.
* Linguaggio_C|C
#include <stdio.h>
int main(void)
{
printf(“Hello World!\n”);
return 0;
}
* C++
#include <iostream>
int main()
{
std::cout << “Hello World!\n”;
}
* C++|C++/CLI
int main()
{
System::Console::WriteLine(“Hello World!”);
}
* C_sharp|C#
class HelloWorldApp
{
public static void Main()
{
System.Console.WriteLine(“Hello World!”);
}
}
* COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY “Hello World!”.
STOP RUN.
—-
* Common LISP
(print “Hello World!”)
* Delphi
program HelloWorld;
{$APPTYPE CONSOLE}
begin
WriteLn(‘Hello World!’);
end.
* EASY
module helloworld
procedure Main
cgiclosebuffer
cgiwriteln(“content-type: text/html”)
cgiwriteln(“”)
cgiwriteln(“Hello World!”)
endproc
* Eiffel
class HELLO_WORLD
creation
make
feature
make is
do
io.put_string(“Hello World!%N”)
end — make
end — class HELLO_WORLD
* Emacs Lisp
(print “Hello World”)
* Erlang
-module(Hello).
-export([Hello_World/0]).
Hello_World() -> io:fwrite(“Hello World!\n”).
* Forth
: Helloforth ( — ) .” Hello World!” ;
* Fortran
PROGRAM HELLO
WRITE(*,10)
10 FORMAT(‘Hello World!’)
STOP
END
* Haskell
main = putStrLn “Hello World!”
* IDL
print,’Hello World’
* Io
“Hello World” print
* Iptscrae
ON ENTER {
“Hello ” “World!” & SAY
}
* Java
public class Hello {
public static void main(String[] args) {
System.out.println(“Hello World!”);
}
}
* JSP
<%
out.println(“Hello, World!”);
%>
* riti
print “Hello World!”
* Logo
print word “Hello World!”
* MATLAB
fprintf(‘Hello, world !’)
* mircscript
echo Hello World!
* MIXAL
TERM EQU 19 the MIX console device number
ORIG 1000 start address
START OUT MSG(TERM) output data at address MSG
HLT halt execution
MSG ALF “MIXAL”
ALF ” HELL”
ALF “O WOR”
ALF “LD ”
END START end of the program
* MS-DOS Batch
@echo Hello World!
* Natural
WRITE ‘Hello World’
*
END
* Oberon
MODULE HelloWorld;
IMPORT Write;
BEGIN
Write.Line(“Hello World!”);
END HelloWorld.
* Objective CAML
let main () =
print_endline “Hello World!”;;
* Open Programming Language
PROC Hello:
PRINT “Hello World”
ENDP
* Pascal
program Hello;
begin
Writeln(‘Hello, World!’);
end.
* Perl
print “Hello World!\n”;
* PHP
<?php
echo ‘Hello World!’;
?>
* Pike
int main() {
write(“Hello World!\n”);
return 0;
}
* PL/1
Test: procedure options(main);
declare My_String char(20) varying init(‘Hello World!’);
put skip list(My_String);
end Test;
* PL/SQL
BEGIN
DBMS_OUTPUT.PUT_LINE(‘Hello World!’);
END;
* Prolog
?- write(“Hello World!”), nl.
* PureBasic
OpenConsole()
Print(“Hello World!”)
CloseConsole()
* Python
print “Hello World!”
* REXX
say “Hello World!”
* RPL
<< “Hello World!” 1 Disp>>
* Ruby
puts “Hello World!”
* Scheme
(display “Hello World!”)
(newline)
* sed
sed -ne ‘1s/.*/Hello World!/p’
* Seed7
$ include “seed7_05.s7i”;
const proc: main is func
begin
writeln(“Hello World!”);
end func;
* Smalltalk
Transcript show: ‘Hello World!’
* SML
print “Hello World!\n”;
* SNOBOL4
OUTPUT = “Hello World!”
END
* STARLET
RACINE: HELLO_WORLD.
NOTIONS:
HELLO_WORLD : ecrire(“Hello World!”).
* SQL
select ‘Hello World!’ as message;
for Oracle-Database
select ‘Hello World!’ from dual;
for IBM-DB2
select ‘Hello World!’ from sysibm.sysdummy1;
for Microsoft SQL Server:
print ‘Hello World!’;
* StarOffice Basic
sub main
print “Hello World!”
end sub
* Tcl
puts “Hello World!”
* TI-BASIC
:Disp “Hello World!”
* TOM
int
main Array arguments
{
[[[stdio out] print “Hello world!”] nl];
}
* Turing
put “Hello World!”
* Unix-Shell
echo ‘Hello World!’
* Visual Basic .Net
Imports System
Module Main
Sub Main()
Console.WriteLine(“Hello World!”)
End Sub
End Module
Grafici
* AppleScript
display dialog “Hello World!”
* C for GTK+
#include <gtk/gtk.h>
void hello(GtkWidget* widget, gpointer data)
{
g_print(“Hello, World!\n”);
}
int main(int argc, char** argv)
{
GtkWidget* window;
GtkWidget* button;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
g_signal_connect(G_OBJECT(window), “destroy”,
G_CALLBACK(gtk_main_quit), NULL);
button = gtk_button_new_with_label(“Hello, World!”);
g_signal_connect(G_OBJECT(button), “clicked”,
G_CALLBACK(hello), NULL);
gtk_container_add(GTK_CONTAINER(window), button);
gtk_widget_show(window);
gtk_widget_show(button);
gtk_main();
return 0;
}
* C++ for FOX
#include “fx.h”
int main(int argc,char **argv)
{
FXApp app(“MyApp”,”Me”);
app.init(argc,argv);
app.create();
FXMessageBox::information(&app,MBOX_OK,”Message”,”Hello World!”);
return app.run();
}
* C++ for GTK+
#include <iostream>
#include <gtkmm/main.h>
#include <gtkmm/button.h>
#include <gtkmm/window.h>
using namespace std;
class HelloWorld : public Gtk::Window {
public:
HelloWorld();
virtual ~HelloWorld();
protected:
Gtk::Button m_button;
virtual void on_button_clicked();
};
HelloWorld::HelloWorld()
: m_button(“Hello World!”) {
set_border_width(10);
m_button.signal_clicked().connect(sigc::mem_fun(*this,
&HelloWorld::on_button_clicked));
add(m_button);
m_button.show();
}
HelloWorld::~HelloWorld() {}
void HelloWorld::on_button_clicked() {
cout << “Hello World!” << endl;
}
int main (int argc, char *argv[]) {
Gtk::Main kit(argc, argv);
HelloWorld HelloWorld;
Gtk::Main::run(HelloWorld);
return 0;
}
* C++
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton Hello( “Hello world!”, 0 );
Hello.resize( 100, 30 );
a.setMainWidget( &Hello );
Hello.show();
return a.exec();
}
* C#
namespace Hello_World
{
using System;
using System.Windows.Forms;
public class HelloWorld : Form
{
public static void Main()
{
Application.Run(new HelloWorld());
}
public HelloWorld()
{
this.Text = “Hello World !” ;
}
}
}
* Clarion
program
window WINDOW(‘Hello World’),AT(,,300,200),STATUS,SYSTEM,GRAY,DOUBLE,AUTO
END
code
open(window)
show(10,10,’Hello World’)
accept
end
close(window)
* Delphi
program HelloWorld;
uses Dialogs;
begin
ShowMessage(‘Hello World!’);
end.
* EASY
module helloworld
procedure Main
Message(“Hello World!”)
endproc
* Gambas
PUBLIC SUB Form_Enter()
PRINT “Hello World”
END
* Java
import java.awt.Frame;
import java.awt.Label;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class HelloWorldFenster extends Frame {
public HelloWorldFenster() {
super(“Hello World!”);
Label HelloWorldLabel = new Label(“Hello World!”);
add(HelloWorldLabel);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
setResizable(false);
setLocation(350, 320);
setSize(160, 60);
setVisible(true);
}
public static void main(String[] args) {
new HelloWorldFenster();
}
}
* Swing
import javax.swing.JFrame;
import javax.swing.JLabel;
public class HelloWorld extends JFrame {
public HelloWorld() {
super(“Hello World!”);
JLabel HelloWorldLabel = new JLabel(“Hello World!”);
getContentPane().add(HelloWorldLabel);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setResizable(false);
setLocation(350, 320);
setSize(160, 60);
setVisible(true);
}
public static void main(String[] args) {
new HelloWorld();
}
}
* LISP
(alert “Hello World!”)
* PureBasic
MessageRequester(“”,”Hello World”)
* Tcl/Tk
label .label1 -text “Hello World”
pack .label1
* Visual Basic .Net
MessageBox.Show(“Hello World!”)
* Visual Basic
MsgBox “Hello World!”
* Waba / SuperWaba
import waba.ui.*;
import waba.fx.*;
public class HelloWorld extends MainWindow
{
public void onPaint(Graphics g)
{
g.setColor(0, 0, 0);
g.drawText(“Hello World!”, 0, 0);
}
}
* Windows API (in Borland Pascal)
program Hello;
uses WinTypes, WinProcs;
const
szClassName = ‘PASCLASS32’;
function WndProc(Window: HWnd; Message, WParam: Word;
LParam: Longint): Longint; export;
var
LPPaint : TPaintStruct;
TheDC : HDC;
begin
WndProc := 0;
case Message of
wm_Destroy:
begin
PostQuitMessage(0);
Exit;
end;
wm_Paint:
begin
TheDC := BeginPaint(Window, LPPaint);
TextOut(TheDC, 5, 5, ‘hello, world’, 12);
end;
end;
WndProc := DefWindowProc(Window, Message, WParam, LParam);
end;
procedure WinMain;
var
Window: HWnd;
Message: TMsg;
const
WindowClass: TWndClass = (
style: 0;
lpfnWndProc: @WndProc;
cbClsExtra: 0;
cbWndExtra: 0;
hInstance: 0;
hIcon: 0;
hCursor: 0;
hbrBackground: 0;
lpszMenuName: szClassName;
lpszClassName: szClassName);
begin
if HPrevInst = 0 then
begin
WindowClass.hInstance := HInstance;
WindowClass.hIcon := LoadIcon(0, idi_Application);
WindowClass.hCursor := LoadCursor(0, idc_Arrow);
WindowClass.hbrBackground := GetStockObject(white_Brush);
if not RegisterClass(WindowClass) then
Halt(255);
end;
Window := CreateWindow(
szClassName,
‘Win32 Pascal Program’,
ws_OverlappedWindow,
cw_UseDefault,
cw_UseDefault,
cw_UseDefault,
cw_UseDefault,
0,
0,
HInstance,
nil);
ShowWindow(Window, CmdShow);
UpdateWindow(Window);
while GetMessage(Message, 0, 0, 0) do
begin
TranslateMessage(Message);
DispatchMessage(Message);
end;
Halt(Message.wParam);
end;
begin
WinMain;
end.
* Windows API (in Borland Turbo Assembler)
.386
LOCALS
JUMPS
.model FLAT, STDCALL
INCLUDE WIN32.INC
L EQU <LARGE>
EXTRN BeginPaint:PROC
EXTRN CreateWindowExA:PROC
EXTRN DefWindowProcA:PROC
EXTRN DispatchMessageA:PROC
EXTRN EndPaint:PROC
EXTRN ExitProcess:PROC
EXTRN FindWindowA:PROC
EXTRN GetMessageA:PROC
EXTRN GetModuleHandleA:PROC
EXTRN GetStockObject:PROC
EXTRN InvalidateRect:PROC
EXTRN LoadCursorA:PROC
EXTRN LoadIconA:PROC
EXTRN MessageBeep:PROC
EXTRN MessageBoxA:PROC
EXTRN PostQuitMessage:PROC
EXTRN RegisterClassA:PROC
EXTRN ShowWindow:PROC
EXTRN SetWindowPos:PROC
EXTRN TextOutA:PROC
EXTRN TranslateMessage:PROC
EXTRN UpdateWindow:PROC
CreateWindowEx EQU <CreateWindowExA>
DefWindowProc EQU <DefWindowProcA>
DispatchMessage EQU <DispatchMessageA>
FindWindow EQU <FindWindowA>
GetMessage EQU <GetMessageA>
GetModuleHandle EQU <GetModuleHandleA>
LoadCursor EQU <LoadCursorA>
LoadIcon EQU <LoadIconA>
MessageBox EQU <MessageBoxA>
RegisterClass EQU <RegisterClassA>
TextOut EQU <TextOutA>
.data
Copyright DB “Turbo Assembler 32 – Hello world”, 0
NewHWND DD 0
lpPaint PAINTSTRUCT <?>
Msg MSGSTRUCT <?>
wc WNDCLASS <?>
hInst DD 0
szTitleName DB “Win32 Assembly Program”
Zero DB 0
szAlternate DB “(Secondary)”, 0
szClassName DB “ASMCLASS32”, 0
szHello DB “hello, world”, 0
HelloLength EQU ($ – OFFSET szHello) – 1
.code
Begin:
PUSH L 0
CALL GetModuleHandle
MOV [hInst], EAX
PUSH L 0
PUSH OFFSET szClassName
CALL FindWindow
OR EAX, EAX
JZ RegClass
MOV [Zero], ‘ ‘
RegClass:
MOV [wc.clsStyle], CS_HREDRAW + CS_VREDRAW + CS_GLOBALCLASS
MOV [wc.clsLpfnWndProc], OFFSET WndProc
MOV [wc.clsCbClsExtra], 0
MOV [wc.clsCbWndExtra], 0
MOV EAX, [hInst]
MOV [wc.clsHInstance], EAX
PUSH L IDI_APPLICATION
PUSH L 0
CALL LoadIcon
MOV [wc.clsHIcon], EAX
PUSH L IDC_ARROW
PUSH L 0
CALL LoadCursor
MOV [wc.clsHCursor], EAX
MOV [wc.clsHbrBackground], COLOR_WINDOW + 1
MOV DWORD PTR [wc.clsLpszMenuName], 0
MOV DWORD PTR [wc.clsLpszClassName], OFFSET szClassName
PUSH OFFSET wc
CALL RegisterClass
PUSH L 0 ; lpParam
PUSH [hInst] ; hInstance
PUSH L 0 ; menu
PUSH L 0 ; parent hwnd
PUSH L CW_USEDEFAULT ; height
PUSH L CW_USEDEFAULT ; width
PUSH L CW_USEDEFAULT ; y
PUSH L CW_USEDEFAULT ; x
PUSH L WS_OVERLAPPEDWINDOW ; Style
PUSH OFFSET szTitleName ; Title string
PUSH OFFSET szClassName ; Class name
PUSH L 0 ; extra style
CALL CreateWindowEx
MOV [NewHWND], EAX
PUSH L SW_SHOWNORMAL
PUSH [NewHWND]
CALL ShowWindow
PUSH [NewHWND]
CALL UpdateWindow
MsgLoop:
PUSH L 0
PUSH L 0
PUSH L 0
PUSH OFFSET Msg
CALL GetMessage
CMP AX, 0
JE EndLoop
PUSH OFFSET Msg
CALL TranslateMessage
PUSH OFFSET Msg
CALL DispatchMessage
JMP MsgLoop
EndLoop:
PUSH [Msg.msWPARAM]
CALL ExitProcess
WndProc PROC USES EBX EDI ESI, hwnd:DWORD, wmsg:DWORD, wparam:DWORD, lparam:DWORD
LOCAL TheDC:DWORD
CMP [wmsg], WM_DESTROY
JE wmDestroy
CMP [wmsg], WM_RBUTTONDOWN
JE wmRButtonDown
CMP [wmsg], WM_SIZE
JE wmSize
CMP [wmsg], WM_CREATE
JE wmCreate
CMP [wmsg], WM_LBUTTONDOWN
JE wmLButtonDown
CMP [wmsg], WM_PAINT
JE wmPaint
CMP [wmsg], WM_GETMINMAXINFO
JE wmGetMinMaxInfo
JMP DefWndProc
wmPaint:
PUSH OFFSET lpPaint
PUSH [hwnd]
CALL BeginPaint
MOV [TheDC], EAX
PUSH L HelloLength ; lunghezza stringa
PUSH OFFSET szHello ; stringa
PUSH L 5 ; y
PUSH L 5 ; x
PUSH [TheDC] ; DC
CALL TextOut
PUSH OFFSET lpPaint
PUSH [hwnd]
CALL EndPaint
MOV EAX, 0
JMP Finish
wmCreate:
MOV EAX, 0
JMP Finish
DefWndProc:
PUSH [lparam]
PUSH [wparam]
PUSH [wmsg]
PUSH [hwnd]
CALL DefWindowProc
JMP Finish
wmDestroy:
PUSH L 0
CALL PostQuitMessage
MOV EAX, 0
JMP Finish
wmLButtonDown:
PUSH L 0
PUSH L 0
PUSH [hwnd]
CALL InvalidateRect ; ridisegna finestra
MOV EAX, 0
JMP Finish
wmRButtonDown:
PUSH L 0
CALL MessageBeep
JMP Finish
wmSize:
MOV EAX, 0
JMP Finish
wmGetMinMaxInfo:
MOV EBX, [lparam] ; ptr a minmaxinfo struct
MOV [(MINMAXINFO PTR ebx).mintrackposition_x], 350
MOV [(MINMAXINFO PTR ebx).mintrackposition_y], 60
MOV EAX, 0
JMP Finish
Finish:
RET
WndProc ENDP
PUBLIC WndProc
ENDS
END Begin
; creare questo file HELLO.DEF:
NAME HELLO
DESCRIPTION ‘Assembly Win32 Program’
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
EXETYPE WINDOWS
HEAPSIZE 8192
STACKSIZE 8192
EXPORTS WndProc
; fine HELLO.DEF
* Windows API (in C)
#include <windows.h>
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
char szClassName[] = “MainWnd”;
HINSTANCE hInstance;
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASSEX wincl;
hInstance = hInst;
wincl.cbSize = sizeof(WNDCLASSEX);
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
wincl.style = 0;
wincl.hInstance = hInstance;
wincl.lpszClassName = szClassName;
wincl.lpszMenuName = NULL; //No menu
wincl.lpfnWndProc = WindowProcedure;
wincl.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); //Color of the window
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION); //EXE icon
wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION); //Small program icon
wincl.hCursor = LoadCursor(NULL, IDC_ARROW); //Cursor
if (!RegisterClassEx(&wincl))
return 0;
hwnd = CreateWindowEx(0, //No extended window styles
szClassName, //Class name
“Window”, //Window caption
WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT, //Let Windows decide the left and top positions of the window
120, 50, //Width and height of the window,
NULL, NULL, hInstance, NULL);
//Make the window visible on the screen
ShowWindow(hwnd, nCmdShow);
//Run the message loop
BOOL bRet;
while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0)
{
if (bRet == -1)
{
// handle the error and possibly exit
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
TextOut(hdc, 15, 3, “Hello World!”, 13);
EndPaint(hwnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
* X Window
xmessage hello, world!
Grafici basati su Browser
* Curl(Linguaggi di programmazione)|Curl
{curl (Version)applet}
Hello world
* Java applet
import java.applet.*;
import java.awt.*;
public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString(“Hello World!”, 100, 50);
}
}
– HTML code to show Applet in a Browser.
<object classid=”java:HelloWorld.class”
codetype=”application/java-vm”
width=”600″ height=”100″>
</object>
* JavaScript
<script type=”text/javascript”>
alert(“Hello World!”);
</script>
* VBScript
<script language=”VBScript”>
MsgBox “Hello World!”
</script>
* XUL
<window xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”>
<box align=”center”>
<label value=”Hello World!” />
</box>
</window>
* XAML
<?Mapping ClrNamespace=”System” Assembly=”mscorlib” XmlNamespace=” http://www.gotdotnet.com/team/dbox/mscorlib/System” ?>
<Object xmlns=” http://www.gotdotnet.com/team/dbox/mscorlib/System” xmlns:def=”Definition” def:Class=”MyApp.Hello”>
<def:Code>
<![CDATA[
Shared Sub Main()
‘{
System.Console.WriteLine(“Hello World!”)’ ;
‘}
End Sub
]]>
</def:Code>
</Object>
Linguaggi di Markup o di Formattazione
* HTML
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
* PostScript
/Courier findfont
24 scalefont
setfont
100 100 moveto
(Hello World!) show
showpage
* Rich Text Format
{\rtf1\ansi\deff0
{\fonttbl {\f0 Courier New;}}
\f0\fs20 Hello World!
}
* TeX
\font\HW=cmr10 scaled 3000
\leftline{\HW Hello World}
\bye
* LaTeX
\documentclass{article}
\begin{document}
Hello World!
\end{document}
Complimenti per il blog e per i post!Ti invito a visitare il mio blog
http://newsfuturama.blogspot.com/
ciao