Re: console routines

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
Shian_Lee said...

No doubts that the std/console.e should have a columns() and rows() routines. It is extremely useful. video_config() returns correct values when opening a new terminal - but not after resizing the terminal.

It could be that you are using an older version of Euphoria. I've been testing V4.1 and using this program below, it shows that it does reflect the real-time console values - at least on Windows. I'm not using a Unix so I can't comment on that.

include std/console.e 
sequence o, n 
clear_screen() 
o = "" 
n = video_config() 
while 1 do 
   if not equal(o,n) then 
       position(1,1) 
       puts(1, "                                               ") 
       position (1,1) 
       ? n 
       o = n 
   end if 
   n = video_config() 
end while 
 

Right now I am using LinuxMint-17 64-bit, Euphoria v4.1.0, and the default MATE Terminal 1.8.0.

The code above does not work. It looks like on Linux there is no way to tell the rows/columns after resizing the terminal (same as in DOS after calling system()).

Is it a bug? I have no idea.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu