1. bug related to dos console getposition() and puts() and linewraps

I set the dosbox some some apps with the dos mode command in a batch file

@mode con: cols=60 lines=40 
@start /B C:\Euphoria-10-Feb-2013\bin\eui.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 
@CLS 

i run the app with, and for the app to find the width of the box, i use the following:

object linelength = 1 
position(1,1) 
for linelengthloop = 1 to 200 do 
  puts(1,"_") 
  junk = get_position() 
  junk = junk[2] 
  if junk = 1 then exit end if  
  linelength = junk 
end for 

The problem is, get_position() will read 60 twice. With the cursor on column 60, the puts() lays down a "_", but the cursor stays there on column 60, the next puts goes to column 1, but the cursor then lands on column 2.

useless

new topic     » topic index » view message » categorize

2. Re: bug related to dos console getposition() and puts() and linewraps

useless_ said...

I set the dosbox some some apps with the dos mode command in a batch file

@mode con: cols=60 lines=40 
@start /B C:\Euphoria-10-Feb-2013\bin\eui.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 
@CLS 

i run the app with, and for the app to find the width of the box, i use the following:

I would recommend using video_config.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: bug related to dos console getposition() and puts() and linewraps

mattlewis said...

I would recommend using video_config.

Don't we still have a bug with get_position() not returning the correct position when it hits the end of the console window and wraps around to the next row?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu