Qbasicnews.com

Full Version: Differences among FB & QB on Textmode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi 2 All!

I was studying the Random Files tutor on QBExpress #6 and notice there are differences among FB & QB Textmode behavior :

DIM YourName AS STRING
COLOR 7, 0
CLS
LOCATE 1, 1: COLOR 0, 5: PRINT SPACE$(80);
LOCATE 10, 1: COLOR 7, 0: PRINT "Your Name :"
LOCATE 10, 12: COLOR 0, 5: INPUT YourName
LOCATE 11, 1: PRINT YourName;
LOCATE 25, 1: COLOR 0, 5: PRINT SPACE$(80);
Sleep

The problem in FB is that the screen allways scroll one line when printing the last line, even when I have put a semicolon, also when finishing the Input , FB colors until the end of the line when QB not.

I don't know if its a bug or simple thats the way FB works; Anyway, Is there a way to avoid the scrolling when printing on the last cursor - row (25,80)?

Greets
Tio Bit
Hi, another question :

When I run this code in QB it's all Ok, but on FB, it looks like the INKEY$ doesn't eats the key it reads (like QB); I must put a INPUT Dummy$ to clear the Return Key, if not the program doesn't reads the "INPUT YourName" command. Is there a way to clear the keyboard buffer on FB?

Greets
Tio Bit


DIM Keyboard AS STRING
DIM Dummy AS STRING
DIM YourName AS STRING
DIM Salary AS LONG


COLOR 7, 0
CLS
LOCATE 1, 1: PRINT "Press Enter to continue..."
WHILE ( Keyboard <> CHR$(13) ): Keyboard = INKEY$: WEND
' INPUT Dummy$

LOCATE 1, 1: COLOR 0, 5: PRINT SPACE$(80);
LOCATE 10, 1: COLOR 7, 0: PRINT "Your Name :"
LOCATE 10, 12: COLOR 0, 5: INPUT YourName
LOCATE 11, 1: PRINT YourName;

LOCATE 12, 1: COLOR 7, 0: PRINT "Salary :"
LOCATE 12, 12: COLOR 0, 5: INPUT Salary
LOCATE 13, 1: PRINT Salary;

Sleep
Quote:Hi 2 All!

I was studying the Random Files tutor on QBExpress #6 and notice there are differences among FB & QB Textmode behavior :

DIM YourName AS STRING
COLOR 7, 0
CLS
LOCATE 1, 1: COLOR 0, 5: PRINT SPACE$(80);
LOCATE 10, 1: COLOR 7, 0: PRINT "Your Name :"
LOCATE 10, 12: COLOR 0, 5: INPUT YourName
LOCATE 11, 1: PRINT YourName;
LOCATE 25, 1: COLOR 0, 5: PRINT SPACE$(80);
Sleep

The problem in FB is that the screen allways scroll one line when printing the last line, even when I have put a semicolon, also when finishing the Input , FB colors until the end of the line when QB not.

I don't know if its a bug or simple thats the way FB works; Anyway, Is there a way to avoid the scrolling when printing on the last cursor - row (25,80)?

Greets
Tio Bit

Hi Tio, That tutor was mine in QB Express #6, and I haven't experienced the problem you describe and I still am not today. I just reopened the example and compiled it to find it works the way it should....what environment are you using? windows XP?
I use Win98SE mainly but tried on XP and also have the same problem but to notice on XP you must set the buffer screen propierty of the DOS Box to 25 (mine is 300 default), if not it would scroll "normally"

BTW Nice Tutos; I have read the 3 parts (like specially the third one about binary files); Have no problem except this one, but it's a screen's one, not file's one.

GReets
Tio Bit
ok now I can reproduce it if I change my screen buffer to 25 like you did...I'll see if I can fix it...if not I'll post the issue on the freebasic website see what happens. :-)
That's a Win9x bug, it won't respect a flag passed (ENABLE_WRAP_AT_EOL_OUTPUT) that tells it to NOT automatically scroll the console, so there's pretty much nothing to be done, in NT/2k/Xp it works as expected.

Edit: just found this at msdn: "ENABLE_WRAP_AT_EOL_OUTPUT: Windows Me/98/95: This value is not supported", and that flag is listed in the win32 api help file, that is 10 years old, mm..
Now there's a subject of discussion ;-).

Of course Windows doesn't support the Windows API that's what I'm to conclude of this? LOL

Part of the many "features" of windows, it doesn't support everything that can make it crash...it just supports what can make it REALLY screw up...LOLOL
In fact the Win32 API was only partially implemented in Win 95 and has evolved with every new version.
The ultimate reference is the MS Platform SDK, it states clearly what you can expect fom each Windows version. Unfortuantely it's a 360 MB downoad, uses it's own format, and the viewer works only in W2000 -XP
You can check it online too.