Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

QBASIC memory problem

My program is getting so big and has so many shared arrayed variables and subs that when I try to run it it gives a "Out of String Space" error. I usually compile it to test it when it gets to that point, but now it won't even let me compile it, it gives a "program-memory overflow" when I try. I included the CLEAR command and the $DYNAMIC command at the beginning of the program and I still get this. Does anyone know how to get around this or allocate more memory for my program?


Comments

  • This is really one of the most vexing problems one can encounter

    in programming, because there's not a lot of attractive options at this

    point:


    1) Get an XMS/EMS library and use extended memory to store some variables

    in. However, this isn't necessarily easy...


    2) Write data that is not being immediatly used to file, then erase the

    dynamic data structure and reallocate the memory. This tends to degrade

    performance.


    3) Cut down on variables, delete stuff.


    4) Find a new compiler, a 32-bit or DOS-Extended one that allows you to

    use XMS as normal mem.







    URL:http://acheronx.resnet.tamu.edu

  • This can be a problem. A long time ago when programmers could only have 640K of RAM they had the same trouble. Then one liners(programs written in one line), were praised. They did so much on one line. an example would be.

    CLS: PRINT "COOL: END

    useing the colon to represent a return

    use this in some places in your program, it will help some, trust me! ;)





  • : This can be a problem. A long time ago when programmers could only have 640K of RAM they had the same trouble. Then one liners(programs written in one line), were praised. They did so much on one line. an example would be.

    : CLS: PRINT "COOL: END

    : useing the colon to represent a return

    : use this in some places in your program, it will help some, trust me! ;)


    That's a load of crap...


    Murmandamus


Sign In or Register to comment.