Odd error with Locate

Windows specific questions.
Post Reply
Pinkpuff
Posts: 26
Joined: Jun 10, 2005 18:45

Odd error with Locate

Post by Pinkpuff »

I just downloaded FB today and when I started playing around, I discovered an odd error with Locate while in graphics mode. It seems to measure from either the top of the screen or the bottom, seemingly at random. For example, this program:

Code: Select all

screen 9
cls
for i = 1 to 1000
 locate 12, 1
 print "Hello World!"
next i
sleep
produces an output screen consisting of a single "Hello World!" most of the time, but around 1 time in 10 it will produce an additional "Hello World!" on the line below. Changing the 1000 to a 10000 causes the program to almost always produce two "Hello World!"s (I have yet to see it produce just one with that setting), and changing the 12 to any other number causes greater vertical distance between the two "Hello World!"s.

Yet another oddity -- the following program:

Code: Select all

screen 9
locate 12, 1
print "Hello World!"
input a$
locate 12, 1
print "Hello World!"
sleep
also produces two "Hello World!"s, 100% of the time (at least I have not seen it fail to do so after many trials)

I am using Windows XP. I have no idea whether it behaves this way under any other OS.
Sterling Christensen
Posts: 142
Joined: May 27, 2005 6:13

Post by Sterling Christensen »

Must be a problem with Windows or gfxlib's Windows driver. I can't reproduce it on Linux.

We could be using different versions of FreeBASIC (0.13 here)
dumbledore
Posts: 680
Joined: May 28, 2005 1:11
Contact:

Post by dumbledore »

couldn't reproduce it either, i'm using the lateset dev version on xp... :/
Keeling
Posts: 148
Joined: May 27, 2005 15:03
Location: USA
Contact:

Post by Keeling »

Both cases worked fine for me under XP using the release version of .13 (april 14 version).
dumbledore
Posts: 680
Joined: May 28, 2005 1:11
Contact:

Post by dumbledore »

what ver of directx do you have? updating that might help.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

everything works here in w98,even when making 10000, 1000000 lol
Post Reply