123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|730|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Commented Bug

Tue, 21 Jan 2025, 14:22
dna

Odd Error


If I remove the comment from the print statement the code runs fine but when added nothing happens?
Any thoughts?



-=-=-
DNA
Tue, 21 Jan 2025, 15:45
Jayenkai
I'm not sure, but you're going to get a stack overflow because you're constantly opening While loops, but the goto is jumping up before it reaches the wend.

-=-=-
''Load, Next List!''
Tue, 21 Jan 2025, 18:10
dna
I got it to work but only with the print statement being used.
I restructured it to avoid the stack overflow but the same result unless the print is being used.



-=-=-
DNA
Tue, 21 Jan 2025, 20:01
Dan
I made some tests and your code has some flaws in the logic.

The "if OMIN<>MIN" comparison never gets executed, because you are setting OMIN=MIN before the comparison.

Second thing is, when using double buffering: draw something on the screen, and when the drawing is done you should flip it immediately.

If you do it as you wanted (when min<>omin) you may have called the CLS command AFTER the drawing is done and therefore clearing the backbuffer - which would display nothing.

see this code:



The explanation why your code works with Print is: the Print statement is probably forcing the flipping of the backbuffer, but only occasionally.

you can see that it is true if you comment out the flip command and uncomment the print statement.

with both flip and print commented out, you should see only the black background.


Edit:

I did some more tests with the above code. If you comment out the flip, uncomment print but add locate 0,0 there will be no flipping.
This leads to the conclusion that it is not the print itself, but the scrolling of the background (which print causes when it hits the bottom line) that may, occasionally, force the flipping of the buffer.
Wed, 22 Jan 2025, 11:45
dna
You're right DAN.
I commented out the setbackbuffer() command and the graphics appeared.
Also an issue, was the exiting of the program when the ESC key was pressed. I commented out the GOTO statement and it's doing that right.
I'm next trying to get a line to move across every second.

-=-=-
DNA
Thu, 23 Jan 2025, 01:55
Dan
Unlike the old pc's like c64 and amiga, todays computers are very fast. Blitzbasic can draw many lines in a millisecond per frame ...

i wrote a test program to check when it starts to slowdown or to crawl: