[comp.sys.mac.apps] MS QuickBASIC maximum array size?

byoung@eleazar.dartmouth.edu (Brian Young) (01/30/91)

I am writing a program in QuickBASIC which requires an integer array of 40,000 
elements.  When I try to run the (compiled) program, it gives an "out of 
memory" error message.  If I make the array static (it has to be dynamic, 
though), or run the program in the QuickBASIC environment, it runs without 
error.  Any suggestions as to how I could get around this problem would be 
gratefully received.

Thanks,
Brian.

mxmora@unix.SRI.COM (Matt Mora) (02/02/91)

In article <1991Jan30.015926.10404@dartvax.dartmouth.edu> byoung@eleazar.dartmouth.edu (Brian Young) writes:
>I am writing a program in QuickBASIC which requires an integer array of 40,000 
>elements.  When I try to run the (compiled) program, it gives an "out of 

40,000 elements? Wow how did you do that? I think QB is limited to 32767
elements in one array. I think because it uses an integer offset.

You could have two arrays a 20k a piece and if you index is > 20 then
subtract 20k from the index  and use the second array.






-- 
___________________________________________________________
Matthew Mora                |  my Mac  Matt_Mora@QM.SRI.COM
SRI International           |  my SUN   mxmora@unix.sri.com
___________________________________________________________