[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027)
Pete's QBASIC Site • Here's the answer. What's the question?
Page 1 of 1

Here's the answer. What's the question?

Posted: Fri Feb 10, 2006 12:32 am
by Stoves
DECLARE FUNCTION readInt! (file%, offset%)
'Coded by drnull

OPEN "..\qbpics\a1.sqr" FOR BINARY AS #1

SCREEN 13
CLS

DIM picH, picW AS INTEGER
DIM bpp AS INTEGER

bpp = 8

picW = readInt(1, 8 ) / bpp
picH = readInt(1, 10)

PRINT "Width is" + STR$(picW)
PRINT "Height is" + STR$(picH)

FUNCTION readInt (file%, offset%)

DIM a$
a$ = " "

GET file%, offset%, a$
value = ASC(a$)
GET file%, , a$
value = value OR (ASC(a$) * 256)

readInt = value

END FUNCTION