不要温和的走进那个良夜
Do not go gentle into that good night

各种语言版的爱老虎油

helloworld

很多女人无法读懂程序猿的心

hello world 是程序中的神话

每一个学设计的人基本都是从这个走过来的

现在我们用他来写这句话

仅仅只是为了表达你在我们心里有多么重要

hello world 每个程序唯一的一次

I LOVE YOU 同样你也是我的唯一

全世界都让我爱你

写给未来的你

——raintrue

 

这里就不用代码高亮格式了(好多无法识别0.0)

#include <stdio.h>

int main()
{
printf(“I Love you !\n”);
return 0;
}

 

 

#include < stdio.h>
#include <iostream>

int main()
{
std::cout <<“I Love you!\n”);
return 0;
}
import os
print ‘I Love you’
os.system(‘pause’)
stack     segment  stack
db       100(?)
stack     ends
data      segment
szhello   db      ‘I Love you’,0dh,0ah,’$’

data      ends

code     segment
assume  cs:code,ds:data,ss:stack
start:
mov     ax,data
mov     ds,ax

mov     ah,9
mov     dx,offset szhello
int     21h

mov     ah,4ch
int     21h
code     ends
end     start

 

 

=========================================================
.版本 2

.程序集 窗口程序集1

.子程序 _按钮1_被单击

标签1.标题 = “我爱你”
=========================================================
public class love

{
public static void main(String args[])

{
System.out.println(“I Love you”);
}
}
index.asp

<%@ Page Inherits=CBE Src=”cb.cs”%>
<form runat=”server”>
<asp:Label id=”lb” runat=”server”/>
<asp:Button id=”bt” runat=”server”
Text=”test”
onclick=”bt_Click”/>
</form>

cb.cs

using System;
using System.Web.UI;
using System.Web.UI.WebControls;

public class CBE:Page{
public Label lb;
public Button bt;
public void bt_Click(Object Source,EventArgs e){
lb.Text=”I Love you”;
}
}
using System;
using System.Collections.Generic;
using System.Text;

namespace helloworld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“I Love you”);

}
}
}
Console.WriteLine (“I Love you”)
de> <html>
<head>
<title>PHP LOVE</title>
</head>
<body>
<?php echo ‘<p>I Love you</p>’; ?>
</body>
</html> de>
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(‘I Love you’);
end;

end.
WHILE (1=1) :
WRITE “I Love you ”
with Ada.Text_Io; use Ada.Text_Io;
procedure Hello is
begin
Put_Line (“I Love you”);
end Hello;

 

 

PROC main()
WriteF(‘I Love you’)
ENDPROC
Accumulator-only architecture: DEC PDP-8, PAL-III assembler
See the Example section of the PDP-8 article.
Accumulator + index register machine: MOS 6502, CBM, ca65 asm
MSG: .ASCIIZ “I Love you”
LDX #0
LDA MSG,X ; load initial char
@LP: JSR $FFD2 ; CHROUT CBM KERNAL
INX
LDA MSG,X
BNE @LP
RTS
Accumulator/Index microcoded machine: Data General Nova, RDOS
See the example section of the Nova article.
Expanded accumulator machine: Intel x86, MS-DOS, TASM
MODEL SMALL
IDEAL
STACK 100H

 

 

MSG DB ‘I Love you$’

 

 

MOV AX, @data
MOV DS, AX
MOV DX, OFFSET MSG
MOV AH, 09H ; DOS: output ASCII$ string
INT 21H
MOV AX, 4C00H
INT 21H
END
General-purpose-register CISC: DEC PDP-11, RT-11, MACRO-11
.MCALL .REGDEF,.TTYOUT,.EXIT
.REGDEF
LOVE: MOV #MSG,R1
MOVB (R1),R0
LOOP: .TTYOUT
MOVB +(R1),R0
BNE LOOP
.EXIT
MSG: .ASCIZ /I Love you!/
.END LOVE

CISC: VAX, VMS, MACRO32
.title love
term_name: .ascid /SYS$INPUT/
term_chan: .blkw 1
out_iosb: .blkq 1
msg: .asciz /I Love you!/
.entry start,0
; establish a channel for terminal I/O
$assign_s devnam=term_name,-
chan=term_chan
blbc r0,error
; queue the I/O request
$qio_s chan=term_chan,-
func=#io$_writevblk,-
iosb=out_iosb,-   p1=msg,-
p2=#13
blbc r0,error
$exit_s ; normal exit
error: halt ; error condition
.end start
BEGIN { print “I Love you!” }

 

 

(traditional, unstructured)
10 PRINT “I Love you!”
20 END

 

 

GET “LIBHDR”
LET START () BE
$(
WRITES (“I Love you!*N”)
$)

 

PROC 0
WRITE I Love you!

 

module love
Start :: String
Start = “I Love you”
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY “I Love you!”.
STOP RUN.
(format t “I Love you!~%”)

 

 

class LOVE
creation
make
feature
make is
local
io:BASIC_IO
do
!!io
io.put_string(“%N I Love you!”)
end — make
end — class LOVE
PROGRAM LOVE
WRITE(*,10)
10 FORMAT(‘I Love you!’)
STOP
END
package main
import “fmt”
func main() {
fmt.Println(“I Love you!”)
}

 

module I Love you (main) where
main = putStr “I Love you!\n”
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 ” I LO”
ALF “VE YO”
ALF “U”
END START end of the program

 

let _ =
print_endline “I Love you!!”;;
OPL
PROC hello:
PRINT “I Love you!”
ENDP

 

create table MESSAGE (TEXT char(15));
insert into MESSAGE (TEXT) values (‘I Love you!!’);
select TEXT from MESSAGE;
drop table MESSAGE;
Or, more simply
print ‘I Love you!’

赞(0)
未经允许不得转载:林枫紫涵 » 各种语言版的爱老虎油

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址