IonicWind Software
February 04, 2012, 11:13:20 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: IWB+ 1.00 (A Visual Designer for IWBasic 2.x)  released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Overwritten lines in console  (Read 1713 times)
0 Members and 2 Guests are viewing this topic.
dghoskins
Paid Subscriber
Newbie
*****
Offline Offline

Posts: 3


« on: December 09, 2009, 11:50:24 AM »

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:

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.
« Last Edit: December 09, 2009, 01:35:01 PM by dghoskins » Logged
Ficko
Paid Subscriber
Sr. Member
*****
Offline Offline

Posts: 271



« Reply #1 on: December 09, 2009, 03:56:16 PM »

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. Wink

http://msdn.microsoft.com/en-us/library/ms686044(VS.85).aspx
Logged
dghoskins
Paid Subscriber
Newbie
*****
Offline Offline

Posts: 3


« Reply #2 on: December 13, 2009, 11:59:32 AM »

Thanks Ficko,

That was the hint I needed.

Dennis
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page January 12, 2012, 02:13:52 AM