fastbasic
fastbasic copied to clipboard
Multi dimension arrays
Apologies if I haven't read the manual properly :)
Does FB have multi-dimension arrays? I tried dim a(9,9) and it threw up an error. I checked manual and it says nothing about it that I can see.
Does FB have multi-dimension arrays? I tried dim a(9,9) and it threw up an error. I checked manual and it says nothing about it that I can see.
No, FastBasic does not support multidimensional arrays, this is because arrays are represented with a single pointer to memory, so the interpreter would have no way to know the dimensions and how to access elements.
No problem, I've just used a variable as a pointer to split a single array into multiple sections. It would be more natural to have multi dimension arrays but it's a simple solution.
Now, if procedures had local variables then that would be the dream :) but i'm guessing that would be more complex for you to sort out than multi dimension arrays.
Hi!
No problem, I've just used a variable as a pointer to split a single array into multiple sections. It would be more natural to have multi dimension arrays but it's a simple solution.
Now, if procedures had local variables then that would be the dream :) but i'm guessing that would be more complex for you to sort out than multi dimension arrays.
No, local variables would be easier, I have planed that for v5.0....
You're an absolute star, I look forward to v5.0
Now I need to go read up about those DLIs, still haven't had time to figure them out - thanks.