0
点赞
收藏
分享

微信扫一扫

[AHK]面向对象的实例--point和line

爱薇Ivy趣闻 2023-04-24 阅读 55


class Point
{
	__New(h,v)
	{
		this.x:=h
		this.y:=v
	}
	GetX()
	{
		return this.x
	}
	GetY()
	{
		return this.y
	}
}

class Line
{
	__New(a,z)
	{
		this.p1:=a
		this.p2:=z
	}
	GetPointA()
	{
		return this.p1
	}
	GetPointZ()
	{
		return this.p2
	}
}
point1:=new Point(0,100)
point2:=new Point(50,50)
line1:=new Line(point1,point2)
MsgBox % line1.GetPointZ().GetX()
;输出 50

举报

相关推荐

0 条评论