Variable trouble

by Nick (no login)


ok, I'll try not to make this too long...

I'm working on a CAD ish program and so far so good cept this

right now I'm just useing lines and have this (shortend for simplification purposes):

screen 7,0,1,0

vr = 1

'user draws a line:

LINE (x1,y1)-(x2,y2), 14

'data of the line gets stored

lin1(vr) = x1
lin2(vr) = y1
lin3(vr) = x2
lin4(vr) = y2

and then to show the line drawn (and other lines drawn afterwards)
lp = vr
DO WHILE lp > 0
LINE (lin1(lp), lin2(lp)) - (lin3(lp), lin4(lp)), 14
lp = lp - 1



every thing works, it draws multiples lines and shows them all.. that is, untill i reach 10 lines
to which i get the message "subscript out of range"
and highlights the "LINE (lin1(lp), lin2(lp)) - (lin3(lp), lin4(lp)), 14"

I'm %90 shure it's the lp varialbe that seems to have a problem going into the double digits.
but i also know for a fact the vr variable has no problem going over that #

anybody know why that might be and how I could fix it?

if you need more info feel free to ask


Posted on Jul 31, 2009, 11:21 PM

Respond to this message   

Goto Forum Home

Response TitleAuthor and Date
*Ya gotta DIM those arrays after 10. Those aren't just variables.Clippy on Jul 31
 Like this...Galleon on Aug 1
  Ahh okNick on Aug 2

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement