
QB45-String Space Corrupt
Quote:
(BobRadil) writes:
>This is what I did and my solution:
>First I started QB with the /ah option. This allows large arrays using
>far pointers. Here is some psudo code:
>qty = 10000
>DIM array(qty) as STRING * 16
<snip>
So where's the '$DYNAMIC metacommand, that array is Static and
limted to 64 kb.
<snip>
Quote:
>As soon as it hit the SWAP command it either crashed the computer
>or a gave a string space corrupt message and dumped QB45. I did
>the same thing on 2 computers. It worked better with smaller arrays.
Not surprising since you only seem to be using static arrays :)
Quote:
>It also helped if I inserted dummy delay loops. These solutions were
>unacceptable. It seems that QB45 can't shift data in and out of array
>elements in large arrays very fast without getting caught up somehow.
Try enabling '$dynamic arrays, de-allocate all unused arrays before
sorting and check any code prior to your sort routine, this may be
the culprit and not the actual sort routine itself.
The string space corrupt message does not always occur at the point
in the code where the actual corruption was produced.
<snip>
Quote:
>Anyone ever have a similar problem? Any other solutions/comments?
You could also try using an alternative, slower swap, assuming that
element 0 is unused -
array(0) = array(a)
array(a) = array(b)
array(b) = array(0)
TTfn,
Craig___