March 28, 2024, 03:49:37 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Overwritten lines in console

Started by dghoskins, December 09, 2009, 09:50:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dghoskins

December 09, 2009, 09:50:24 AM Last Edit: December 09, 2009, 11:35:01 AM by dghoskins
In printing data lines to a console window, the printed lines seem to wrap around and overwrite previous lines.  For example, in the following code:


OPENCONSOLE

FOR temp = 1 TO 500
PRINT "Line ", temp
NEXT temp

PRINT "Press any key to exit"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


when I scroll to the top of the console window the top line is "Line 203".

Experimenting with the upper limit in the loop, I find that an upper limit of 297 does not wrap.

Is this a windows limit or an Emergence Basic limit?  

I found a reference to a "console_resize.eba" posting for changing the # of columns in a console but I cannot find the original posting.

Any help would be appreciated.

Dennis Hoskins

EDIT:  The equivalent program in Aurora shows the same behavior.

Ficko

Hi Dennis,

I think you have to do a little study about "console screen buffer" and its relation to "console screen buffer's window".

What you are experiencing is the overflow of the buffer shifting out the oldest bytes. ;)

http://msdn.microsoft.com/en-us/library/ms686044(VS.85).aspx

dghoskins

Thanks Ficko,

That was the hint I needed.

Dennis