BBS: Inland Empire Archive Date: 04-23-92 (11:43) Number: 168 From: GARY POOL Refer#: NONE To: ALL Recvd: NO Subj: Huge Arrays Conf: (2) Quik_Bas
I was looking through an old PC Magazine (9-12-89) that addressed a problem Tom Hammond was having & I thought I'd pass it on to all. In a letter to the "Languages" section, James Orleff writes: I purchased QuickBasic...to handle data arrays as large as available memory... According to the manual, creating an array larger than 64K requires using the $DYNAMIC metacommand and the /AH compile switch...Even though more than 300K available..."Subscript out of range error". SOLUTION: Because length of each string in array was not an even power of 2, the last string that fit in a 64K segment did not end on a segment boundary...QB can only handle **one** intersegment gap in an array. Limiting the size to 128K. Though I only needed 80 bytes per element, I increased it to 128 bytes. Therefore, Tom, you need to change your 70 byte string to 64 or 128. gp --- WM v2.00/91-0231 * Origin: The Modem Zone BBS (314) 893-5106 (1:289/2)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET