标题: Convert Pascal to Visual Basic [打印本页] 作者:
Joe 时间: 2006-8-1 00:35 标题: Convert Pascal to Visual Basic
Hi,
I am facing the problem in visual basic. My quesion is how to convert the below pascal in vb.
procedure coordinates(x, y:real; var sx, sy:integer; var OnScreen:boolean);
begin
sx:= round((getmaxx / Rx) * x + ((-getmaxx/Rx) * X_max + getmaxx));
sy:= round((-getmaxy / Ry) * y + ((getmaxy/Ry) * Y_min + getmaxy));
onscreen:= not ((sx < 0) or (sy < 0) or (sx > getmaxx) or (sy > getmaxy));
end;
thanks
Joe 作者:
风雨声中 时间: 2006-8-1 09:54
Sub coordinates(x As Single, y As Single, sx As Integer, sy As Integer, OnScreen As Boolean)
sx = Round((getmaxx / Rx) * x + ((-getmaxx / Rx) * X_max + getmaxx))
sy = Round((-getmaxxy / Ry) * y + ((getmaxy / Ry) * Y_min + getmaxy))
OnScreen = Not ((sx < 0) Or (sy < 0) Or (sx > getmaxx) Or sy > (getmaxy))
End Sub 作者:
Joe 时间: 2006-8-1 10:38