[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)
[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
Pete's QBASIC Site • Array question
Page 1 of 1

Array question

Posted: Thu May 04, 2006 12:33 am
by spysmily1
Are all elements of an array stored in consecutive memory like in C?

Also if they are given storage ahead of time and you declare an array without a type how does it know how much space to give without knowing the type?

Posted: Thu May 04, 2006 5:02 am
by RayBritton
I think you have have to declare type, including string length

Re: Array question

Posted: Thu May 04, 2006 3:58 pm
by Antoni
>Are all elements of an array stored in consecutive memory like in C?
Yes, they are

>Also if they are given storage ahead of time and you declare an array without a type how does it know how much space to give without knowing the type?
Arrays in QB always have a type, if you omit it the default type is used (SINGLE).

Array question

Posted: Thu May 04, 2006 9:44 pm
by spysmily1
Thx Antoni, i did finally find the qb help file for the default type, but your 1st answer helps alot.