Qbasicnews.com
About console stuff in freeBASIC linux. - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html)
+--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html)
+--- Thread: About console stuff in freeBASIC linux. (/thread-8560.html)



About console stuff in freeBASIC linux. - na_th_an - 12-15-2005

Maybe the reply to this question is quite obvious, but I was wondering if there was any way to detect the console size from a fB program. Mainly using the linux port.

I want my word-wrapping functions to work in any terminal, and to stretch to the maximum width possible.


About console stuff in freeBASIC linux. - Sterling Christensen - 12-15-2005

Code:
blah = WIDTH
xResolution = blah AND &hFFFF
yResolution = blah SHR 16



About console stuff in freeBASIC linux. - na_th_an - 12-15-2005

Thanks Smile I didn't know WIDTH was a function now. You made my day Big Grin


About console stuff in freeBASIC linux. - na_th_an - 12-15-2005

I found some about the behaviour of Width as a function which doesn't seem to be documented on the freebasic site: as soon as it is called, the cursor goes to the top-left of the console window/screen. Nothing very terrible as it can be walked around using POS and CSRLIN.

Are you aware of it?

I'm using Ubuntu, btw.


About console stuff in freeBASIC linux. - red_Marvin - 12-15-2005

I've noticed it too.


About console stuff in freeBASIC linux. - Sterling Christensen - 12-15-2005

Yep, same here on Gentoo in Konsole.