Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with "Out of Memory" errors
#6
Hi everyone,

I found the bug, which was -- as RandomiserUser guessed -- in my array bounds. Specifically I have  a teletype-style print routine, which looks like:
Code:
sub teletype(p$ as string)
    dim k as uinteger

    printat42(20,1)

    for k=0 to len(p$)-1
        print42(p$(k))
        beep 0.0002,-10
    next k

    BLWindowScrollUp(1,14,30,7)

    return
end sub

Sadly, I didn't spot that this can't cope with an empty string. I think, as k is a uinteger, what I get is a loop from 0 to 65,535 with an empty string, which is entertaining to watch print.

Thanks, Georgeo.
Reply


Messages In This Thread
Dealing with "Out of Memory" errors - by georgeo - 03-08-2021, 01:09 PM
RE: Dealing with "Out of Memory" errors - by georgeo - 03-10-2021, 09:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)