Explicit types are good... I'd recommend something like this:
function pointCreate(x as Integer, y as Integer) as Object
return {
x: x,
y: y,
toStr: function() as String
return "point("+str(m.x)+", "+str(m.y)+")"
end function
}
end function
function main() as Void
points = [] ' Create a new array
' Create points, and add them to list
for x = 0 to 9
point = pointCreate(x, 10) ' All points have y-coordinate of 10
points.push(point)
end for
' Output points
print "The Points are: "
for each point in points
print point.toStr()
end for
' Example accessing single x, y
point = points[0] ' Get first Point
print "First Point's X: ";point.x
end function