你知道多少种编程语言?也许是java、python、C、C++,或是html,vbs,bat,C#,ruby,今天,你将会见识到这202种或是你熟知的,又或是你不熟知的编程语言。用它们输出hello world,会是什么样呢?
CGI in c语言:
#include
main ()
{
printf ("Content-type: text/html\n");
printf ("\n");
printf ("\n");
printf ("\n");
printf ("Hello, world! \n");
printf ("\n");
printf ("\n");
printf ("\n");
printf ("Hello, world!\n");
printf ("\n");
printf ("\n");
}
CLIPS语言:
(deffacts facts (a))
(defrule rule1 "Hello World"
?a<-(a)
=>
(retract ?a)
(printout t "Hello World" crlf)
(assert (a))
)
CLU语言:
start_up = proc()
outstream:stream := primary_output()
for s:string in get_hello_world() do
stream$putl(outstream,s)
end
end
get_hello_world = iter() yields(string)
while (true) do
yield ("Hello, World!")
end
end
COBOL语言:
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000300 DATE-WRITTEN. 02/05/96 21:04.
000400* AUTHOR BRIAN COLLINS
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400 DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500 DISPLAY "HELLO, WORLD." LINE 15 POSITION 10.
100600 STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800 EXIT.
Codeworks语言:
user tell "Hello, World".
CORC语言:
NOTE "HELLO WORLD" IN CORC (CORNELL UNIVERSITY COMPUTING \ LANGUAGE)
TITLE HELLO WORLD
STOP
CPL语言:
TYPE ' Hello World
CP/M M80语言:
Title "Hello, World!"
ORG 0100H
Print: LD HL,10H
PUSH HL
LOOP:
LD DE,MSG
LD C,09H ; CP/M write string to console call
CALL 0005H
POP HL ; Get loop counter
DEC HL ; and decriment it
PUSH HL ; Put back on stack
LD A,L
JR NZ, LOOP ; Loop while not zero
POP HL ; Clean up stack
LD C,00H ; CP/M system reset call - shut down
CALL 0005H
HALT ; This code is never reached
MSG:
TEXT "Hello, World!"
DB 0Ah
DB "$" ; Line terminator
ENDM Print
DCAlgol语言:
BEGIN
ARRAY DCREC [0:0];
MESSAGE BUSTER;
QUEUE PRIMARY;
INTEGER I1;
POINTER P1;
ALLOCATE (BUSTER, 8);
BUSTER [0] := 0;
I1 := DCWRITE (BUSTER, PRIMARY); %Initialize Primary Queue
ALLOCATE (BUSTER, 9);
BUSTER [0] := 0 & 4 [47:8] & 1 [31:1] & 1 [30:1] & 1 [29:1]
& 1 [28:1] & 1 [27:1] & 1 [26:1] & 1 [25:1] & 472 [22:23];
I1 := DCWRITE (BUSTER); %Station Inquiry
RESIZE (DCREC, SIZE (BUSTER) + 10, DISCARD);
REPLACE P1:DCREC [1] BY POINTER (BUSTER [1], 8) FOR (SIZE (BUSTER) -
1) * 6;
WHILE MYSELF.TASKVALUE = 0 DO
DISPLAY ("HELLO WORLD"); %Duh
END.
Dylan语言:
(define (hello ) (method () (print "Hello, World")))
Easytreive语言:
JOB INPUT NULL
DISPLAY 'HELLO WORLD'
GO TO JOB
Eiffel语言:
class HELLO_WORLD
creation
make
feature
make is
local
io:BASIC_IO
do
!!io
io.put_string("%N Hello World!!!!")
end --make
end -- class HELLO_WORLD
Erlang语言:
-module(hello).
-export([hello_world/0]).
hello_world()->
io:format("Hello World ~n").
-----------------------------------------------------------------------
And Executing:
hello:hello_world().
Euphoria语言:
puts(1, "Hello World!\n")
FileNet WorkFlo Language语言:
include system "display.wfi";
MAIN : procedure;
beginproc
display popup 'Hello World' wait foruser;
endproc;
endmodule;
这是第31~45种语言,想看后续的请关注作者哦
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)