private
fx,fy:integer
public
property x:integer read fx write fx
property y:integer read fy write fy
constructor create
Tline=object
private
d1,d2:TPoint
public
function LengLine(p1,p2:TPoint):integer
constructor create
end
constructor Tpoint.create
begin
fx:=0
fy:=0
end
constructor TLine.create
begin
d1.x:=0
d1.y:=0
d2.x:=0
d2.y:=0
end
function Tline.LengLine(p1,p2:TPoint):integer
begin
result:=sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y))
end
var a,b,c:stringbegin
a:=Copy(edit1.text,1,1)
b:=Copy(edit1.text,2,1)
c:=Copy(edit1.text,3,1)
showmessage(a)
showmessage(b)
showmessage(c)
end
2:
var a,b,c:integer
begin
a:=strtoint(Copy(edit1.text,1,1))
b:=strtoint(Copy(edit1.text,2,1))
c:=strtoint(Copy(edit1.text,3,1))
showmessage(inttostr(a))
showmessage(inttostr(b))
showmessage(inttostr(c))
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)