type 你女朋友=class(女人) private F处女:Boolean; constructor Create;override; procedure fuck; published property 处女:Boolean read F处女:Boolean; write F处女:Boolean; end;procedure 你女朋友.fuck; begin F处女:=False; end;
继承5楼的: type 你女朋友A=class(你女朋友) private procedure fuck; reintroduce; end;procedure 你女朋友A.fuck; begin //fuck的过程 处女:=False; end;
type TGirlFriend = class(TWoman) private FInitialized: Boolean; F处女: Boolean; public constructor Create; procedure Init(Something: Event); procedure Fuck; end;implementation{ TGirlFriend }constructor TGirlFriend.Create; begin inherited; F处女 := True; end;procedure TGirlFriend.Init(Something: Event); begin Randomize; if Something=抛电眼 then if Random(10000)=1 then FIniitialized := True; if Something=写情书 then if Random(1000)=1 then FIniitialized := True; if Something=送玫瑰 then if Random(100)=1 then FIniitialized := True; if Something=送钻戒 then if Random(10)=1 then FIniitialized := True; if Something=不断的死缠烂打+各类糖衣炮弹+合时宜的真情告白+一刹那的感动 then FInitialized := True; end;procedure TGirlFriend.Fuck; begin if not FInitialized then raise Exception.Create('强奸啊!!!'); if F处女 then begin ShowMessage('好痛...'); F处女 := False; end else ShowMessage('好爽!'); end;
ha ha D区的人才们,,
再加个属性 property 处女 : Boolean read F处女;
然后调用var GirlFriendA : TGirlFriend; 我很传统:Boolean; begin 我很传统:=GetMyInformation(...); try GirlFriendA : =TGirlFriend; if GirlFriendA.处女 then begin GirlFriendA.Init(MyEvent); GirlFriendA.Fuck; end else begin if 我很传统 then begin showmessage('我很传统的!'); exit; end else begin GirlFriendA.Fuck; end; end; finally GirlFriendA.free; end;end;
GirlFriendA : = TGirlFriend.create;
我想起一个牛人说的话: First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. (George Carrette) 首先学习计算机科学和那些理论,然后摸索出你自己的编程风格,然后把那些都忘掉,乱来就行了。 -- George Carrettetrackback:http://blog.163.com/jingtao_zh/blog/static/21494368200711191816837
你女朋友=class(女人)
private
F处女:Boolean;
constructor Create;override;
procedure fuck;
published
property
处女:Boolean read F处女:Boolean; write F处女:Boolean;
end;procedure 你女朋友.fuck;
begin
F处女:=False;
end;
type 你女朋友A=class(你女朋友)
private
procedure fuck; reintroduce;
end;procedure 你女朋友A.fuck;
begin
//fuck的过程
处女:=False;
end;
type
TGirlFriend = class(TWoman)
private
FInitialized: Boolean;
F处女: Boolean;
public
constructor Create;
procedure Init(Something: Event);
procedure Fuck;
end;implementation{ TGirlFriend }constructor TGirlFriend.Create;
begin
inherited;
F处女 := True;
end;procedure TGirlFriend.Init(Something: Event);
begin
Randomize;
if Something=抛电眼 then
if Random(10000)=1 then
FIniitialized := True;
if Something=写情书 then
if Random(1000)=1 then
FIniitialized := True;
if Something=送玫瑰 then
if Random(100)=1 then
FIniitialized := True;
if Something=送钻戒 then
if Random(10)=1 then
FIniitialized := True;
if Something=不断的死缠烂打+各类糖衣炮弹+合时宜的真情告白+一刹那的感动 then
FInitialized := True;
end;procedure TGirlFriend.Fuck;
begin
if not FInitialized then raise Exception.Create('强奸啊!!!');
if F处女 then
begin
ShowMessage('好痛...');
F处女 := False;
end
else
ShowMessage('好爽!');
end;
property 处女 : Boolean read F处女;
GirlFriendA : TGirlFriend;
我很传统:Boolean;
begin
我很传统:=GetMyInformation(...);
try
GirlFriendA : =TGirlFriend;
if GirlFriendA.处女 then
begin
GirlFriendA.Init(MyEvent);
GirlFriendA.Fuck;
end
else
begin
if 我很传统 then
begin
showmessage('我很传统的!');
exit;
end
else
begin
GirlFriendA.Fuck;
end;
end;
finally
GirlFriendA.free;
end;end;
First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack. (George Carrette)
首先学习计算机科学和那些理论,然后摸索出你自己的编程风格,然后把那些都忘掉,乱来就行了。 -- George Carrettetrackback:http://blog.163.com/jingtao_zh/blog/static/21494368200711191816837
不过提前声明变量 对于别人来阅读你的代码还是有一定好处的
这曾经算是pascal是最优美的语言的依据之一