|
Post by Psycho on Aug 14, 2008 19:13:22 GMT -5
Funny votan happened to need this command earlier but by accident I have stumbled upon what may or may not be a bug (it's the same in the released version of RBP as well as beta 2). The following code produces an error unless the array is dimmed, yet it only has 7 elements. The code works fine in Liberty Basic. Errors out: types$ = "ALL MA7 MA10 MA16 WB10 WB18 MG" for x = 1 to 7 type$(x)=word$(types$,x) next x print "Size / Type" listbox #size, type$(),1 Works fine: types$ = "ALL MA7 MA10 MA16 WB10 WB18 MG" dim type$(7) for x = 1 to 7 type$(x)=word$(types$,x) next x print "Size / Type" listbox #size, type$(),1 The error reads: Runtime Error in program 'untitled': type$(x)=word$(types$,x) Message not understood: #value: You can even put the dim statement after the listbox command and it will work Is this a bug or am I missing something? Psycho
|
|
|
Post by mackrackit on Aug 15, 2008 2:01:31 GMT -5
|
|
|
Post by Psycho on Aug 15, 2008 11:36:08 GMT -5
No, I did not see that I was still going off the common "up to 10" mentality from Liberty Basic and hadn't seen the note that all array's had to be dimmed. Looking back, all the other arrays in my program are very large so I had dimmed them all as needed. This was the first time I had used one under 10. Thanks for pointing this out. Psycho
|
|