Qbasicnews.com

Full Version: Error in FB or in the Documentation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
While working up a quick example I noticed that the documentation at http://www.hybd.net/~mms/fb/help/current...rence.html states the optional SCREEN in the WINDOW command will NOT make the screen increase in a Cartesian manner. However.....

Code:
const PI as double  = 3.1415926535897932385
const CircleRadius as double = 9.5

dim angle as double
dim a as double
dim x as double
dim y as double
dim old_x as double
dim old_y as double


screen 18,32,1,1
window screen (-10,10) - (10,-10)
cls
PRINT "Hit Any Key To Begin"
sleep
cls

'Draw some old fashioned X, Y axis
line (-10,0)-(10,0),rgb(255,0,0)
line (0,10)-(0,-10),rgb(255,0,0)
do while inkey$<>""
loop

for angle = 0 to 2*pi step Pi/12
      pset(old_x,old_y),rgb(0,0,0)
      x = CircleRadius * cos(angle)
      y = CircleRadius * sin(angle)
      pset (x,y),rgb(255,255,255)
      old_x = x
      old_y = y
      sleep 500
next angle

for a = 0 to 10
   line (1,0)-(1,a),rgb(255,0,255)
   sleep 500
next angle
sleep

This works as it should, but opposite what the document says.... remove the SCREEN command in the WINDOW command and the opposite happens.
yeah your probably right, i have no idea how the commands work. I will check over them - perhaps get someone who know's what the commands do to help me maybe.
This bug has already been pointed out. A fix for it is currently in CVS.