Does anyone know how to use arrays bigger than (180,180) in Qbasic or Quickbasic?
Is it possible to use arrays of size (300,300) wich is 90Kb, or even better, (300,300,300) wich is 27 Mb?
It seems one must use dynamic arrays, some switches in the command line, and some sort of EMS but I dont understand how to put it together.
Edit: Looks like dim(xx,xx) always produce a static array.
________
Mike parkes
Large arrays
Large arrays
Last edited by nyfiken on Tue Feb 15, 2011 10:32 pm, edited 1 time in total.
Re: Large arrays
the biggest i could get to work was 125,125....so i made minenyfiken wrote:Does anyone know how to use arrays bigger than (180,180) in Qbasic or Quickbasic?
Is it possible to use arrays of size (300,300) wich is 90Kb, or even better, (300,300,300) wich is 27 Mb?
It seems one must use dynamic arrays, some switches in the command line, and some sort of EMS but I dont understand how to put it together.
Edit: Looks like dim(xx,xx) always produce a static array.
about 120,80...when i tried 900,900(a map) it locked up...
the biggest i could get to work was 125,125....so i made mine
about 120,80...when i tried 900,900(a map) it locked up...
Seems like max is 180,180 with integer (2 byte) and 127,127 with long or single (4 byte), a 64k limit.
So 300,300 integer it should be 300*300*2=180 kb.
After rewiewing my code I see I only need approx 500*5, very sloppy programming.
QB will be used some more... (but it was interesting to look at VBW)
________
Yamaha dragstar history
Last edited by nyfiken on Tue Feb 15, 2011 10:32 pm, edited 1 time in total.
Good work
Good man!! Nearly every time someone needs more space or a faster computer, etc., it turns out that they really need to code better.nyfiken wrote:After reviewing my code, I see I only need approx 500*5
In 1961, I managed a team that wrote an operating system for the Joint Chief's Command Center at the Pentagon. We required 4K of memory. That's right, 4K. the other 12K were reserved for application programs.
And it was a pretty snappy system, giving the generals multi-colored displays of war data and options to invoke troup actions. On a 1401 computer.
Now, I save a data file consisting of one byte and it appears to take more than 4K. LOL and shame on the programmers of today.
I'm glad you saw the light!
Mac