版本比较
"信息学是你的最佳选择!"之具体实现
正文
增加 63 行删除 63 行
149 行未改动全部展开15015115215315415415515615715815615715815916016116216116216316416516624 行未改动19119219319419519519619719819946 行未改动246247248249250251252250251252253254255256127 行未改动全部展开38438538638738838939039139239338838939039139239339439539639739 行未改动43743843944044144144244344444516 行未改动462463464465466466467468469470471472473474475476477475476477478479480481305 行未改动全部展开7877887897907917917927937947957 行未改动8038048058068078078088098108114 行未改动81681781881982082082182282382426 行未改动85185285385485585685585685785885986086086186286386486586686786886986886987087187287287387487587687787887988088188288288388488488588688788888989089189289389489489589689789789889990090135 行未改动93793893994094194194294394394494594694794894894995095195295395495595695695795895996096196296296396496596612 行未改动9799809819829839839849859869879879889899909913 行未改动99599699799899999910001001100110021003100410053 行未改动1009101010111012101310141013101410151016101710185 行未改动102410251026102710281029103010281029103010311032103310341035103510361037103810395 行未改动104510461047104810491049105010511052105318 行未改动1072107310741075107610761077107810791079108010811082108342 行未改动11261127112811291130113011311132113311341134113511361137113810 行未改动114911501151115211531153115411551156115733 行未改动11911192119311941195119511961197119711981199119912001201120212031203120412051205120612071208120812091210121112121213121312141215121612172 行未改动122012211222122312241224122512261227122822 行未改动149 行未改动全部展开print "信息学是你的最佳选择!\n"24. MIXAL25. MSIL.assembly Informatics{ {.ver 1:0:0:0} .method public static void main() il managed { }.method public static void main() il managed{.entrypoint.maxstack 1ldstr "信息学是你的最佳选择!\n" call void [mscorlib]System.Console::Write(class System.String) ldstr "信息学是你的最佳选择!\n"call void [mscorlib]System.Console::Write(class System.String)ret}
26. OCaml24 行未改动print "信息学是你的最佳选择!\n"
30. Pike//命令行界面int main() int main(){ write("信息学是你的最佳选择!\n"); return 0;}46 行未改动print "信息学是你的最佳选择!\n"
38. Satherclass HELLO_WORLD is main is #OUT+"Hello World\n"; end; main is #OUT+"Hello World\n"; end;end;
39. Scheme(display "Hello, world!\n")127 行未改动全部展开 .DATAHello DB /'信息学是你的最佳选择!/',13,10,/'$/' .CODE mov ax,@data mov ds,ax mov ah,9 mov dx,OFFSET Hello int 21h mov ah,4ch int 21h mov ds,ax mov ah,9 mov dx,OFFSET Hello int 21h mov ah,4ch int 21h END
52. ASPresponse.write "信息学是你的最佳选择!"39 行未改动print("信息学是你的最佳选择!");
易语言:标准输出 (, “信息学是你的最佳选择!”)
或
信息框 (“Hello World!”, 0, )
16 行未改动一个没有main方法的Java版Hello World程序:
class Hello{ static static { System.out.println("信息学是你的最佳选择!"); System.exit(0); }}
Xaml:<Canvas xmlns="http://schemas.microsoft.com/2003/xaml" Background="LightCyan" <Canvasxmlns="http://schemas.microsoft.com/2003/xaml"Background="LightCyan"Width="100%" Height="100%"><Text Canvas.Left="90" Canvas.Top="20" FontSize="36">信息学是你的最佳选择!</Text></Canvas>
305 行未改动全部展开GambasPUBLIC SUB Main() Print "信息学是你的最佳选择!"ENDExpanded accumulator machine: Intel x86, Linux, GAS Expanded accumulator machine: Intel x86, Linux, GAS.datamsg:.ascii "Hello, world!\n"len = . - msg7 行未改动int x80movl ,%ebxmovl ,%eaxint x80General-purpose-register CISC: DEC PDP-11, RT-11, MACRO-11 General-purpose-register CISC: DEC PDP-11, RT-11, MACRO-11 .MCALL .REGDEF,.TTYOUT,.EXIT .REGDEF
HELL MOV #MSG,R14 行未改动 .EXIT
MSG: .ASCIZ /HELLO, WORLD!/ .END HELLOCISC on advanced multiprocessing OS: DEC VAX, VMS, MACRO-32 CISC on advanced multiprocessing OS: DEC VAX, VMS, MACRO-32 .title hello
.psect data, wrt, noexe
26 行未改动 ; Return to operating system end: ret
.end helloRISC processor: ARM, RISC OS, BBC BASIC/'s in-line assembler .program RISC processor: ARM, RISC OS, BBC BASIC/'s in-line assembler .program ADR R0,message "OS_Write0" "OS_Exit" .message .message DCS "Hello, world!" DCB 0 ALIGNor the even smaller version (from qUE);
"OS_WriteS":EQUS"Hello, world!":EQUB0:ALIGN:MOVPC,R14
TI-BASIC On TI-80-TI-86 calculators. TI-BASICOn TI-80-TI-86 calculators.:Disp "Hello, world!"
On TI-89/TI-92 calculators. On TI-89/TI-92 calculators. :HelloWorld() :Prgm :Disp "Hello, world!" :EndPrgm
Commodore BASIC (unstructured) 10 ?"Hello, world!" 20 END
DCL batch DCL batch $ write sys$output "Hello, world!"Ed and Ex (Ed extended) Ed and Ex (Ed extended) a 信息学是你的最佳选择! . por like s
echo -e /'a\n信息学是你的最佳选择!\n.\np/'|ed echo -e /'a\n信息学是你的最佳选择!\n.\np/'|ex
EUPHORIA EUPHORIA puts(1, "Hello, world!")
Forte TOOL Forte TOOL begin TOOL HelloWorld;
includes Framework; HAS PROPERTY IsLibrary = FALSE;35 行未改动 StartingMethod = (class = Hello, method = Init);
end HelloWorld;
Frink Frink println["Hello, world!"]Game Maker Game MakerIn the draw event of some object:
draw_text(x,y,"Hello World");
HP-41 & HP-42S HP-41 & HP-42S(Handheld Hewlett-Packard RPN-based alphanumeric engineering calculators.)
01 LBLTHELLO 02 THELLO, WORLD 03 PROMPT
Io Io "信息学是你的最佳选择!" printor
write("信息学是你的最佳选择!\n")
JVM JVM(disassembler output of javap -c Hello.class)
public class Hello extends java.lang.Object { public Hello();12 行未改动 8 return
kogut WriteLine "Hello, world!"MUF MUF : main me @ "Hello, world!" notify ;POV-Ray POV-Ray#include "colors.inc"camera { location <3, 1, -10> look_at <3,0,0>3 行未改动 ttf "timrom.ttf" "信息学是你的最佳选择!" 1, 0 pigment { White }}
Processing Processingprintln("信息学是你的最佳选择!");RPL RPLSee also GUI section.
(On Hewlett-Packard HP-28, HP-48 and HP-49 series graphing calculators.)
3 行未改动 0 WAIT DROP >>
XHTML 1.1
XHTML 1.1(Using UTF-8 character set.)
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">5 行未改动 <p>Hello, world!</p> </body></html>
XUL <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <box align="center"> <label value="Hello, world!" /> </box> </window> LaTeX XUL<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <box align="center"> <label value="Hello, world!" /> </box> </window>LaTeX/documentclass/begin Hello, world!/endRuby with WxWidgets Ruby with WxWidgetsSee also TUI section.
require /'wxruby/'
5 行未改动end
HelloWorldApp.new.main_loop
SWT SWTimport org.eclipse.swt.SWT;import org.eclipse.swt.layout.RowLayout;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Shell;18 行未改动 display.dispose (); }}
RTML RTMLHello ()TEXT "Hello, world!"Qt toolkit (in C++) Qt toolkit (in C++) #include <qapplication.h> #include <qpushbutton.h> #include <qwidget.h> #include <iostream>42 行未改动 System.exit(0); } }
GTK 2.x (in Euphoria) GTK 2.x (in Euphoria) include gtk2/wrapper.e
Info(NULL,"Hello","信息学是你的最佳选择!")GTK# (in C#) GTK# (in C#)using Gtk;using GtkSharp;using System;
10 行未改动
}}
GTK toolkit (in C++) GTK toolkit (in C++) #include <iostream> #include <gtkmm/main.h> #include <gtkmm/button.h> #include <gtkmm/window.h>33 行未改动 #import <Cocoa/Cocoa.h> @interface hello : NSObject { } @end
@implementation hello
-(void)awakeFromNib { { NSBeep(); // we don/'t need this but it/'s conventional to beep when you show an alert NSRunAlertPanel(@"Message from your Computer", @"Hello, world!", @"Hi!", nil, nil); }
@endTACL TACL #OUTPUT Hello, world!
STARLET STARLET RACINE: HELLO_WORLD.
NOTIONS: HELLO_WORLD : ecrire("Hello, world!").POV-Ray POV-Ray#include "colors.inc"camera { location <3, 1, -10> look_at <3,0,0>2 行未改动text { ttf "timrom.ttf" "信息学是你的最佳选择!" 1, 0 pigment { White }}OPS5 OPS5 (object-class request ^action)
(startup22 行未改动