BBS: Inland Empire Archive Date: 05-13-92 (14:48) Number: 93 From: JEAN CREPEAU Refer#: NONE To: CHARLIE QUANTE Recvd: NO Subj: Saving Using Bload/Bsave Conf: (2) Quik_Bas
In a message to ALL, CHARLIE QUANTE wrote: CQ=> Hello! CQ=> I posted this as part of an earlier message, and got no reply. Either my message got lost in the flow, or I've stumped the talented programmers here. Either way, I thought I would try once more. I have a program using a 40 by 40 integer array. It is part of a door program I wrote, and I read the array info from a sequential file. It seems to take FOREVER! I saw something in a book, (unfortunately I can't remember where), that used BLOAD and BSAVE to load and save a single dimension array. The address of the first array element was involved, as well as the total size in bytes of the array. Would something similar work with a two dimensional array? How exactly would I code that? Is there a better, quicker way? Thanks, Charlie. Never got your previous message! Ok. To save your array: DEF SEG = VARSEG(array(0,0)) BSAVE "filename",VARPTR(array(0,0)),40*40*2 DEF SEG To load it back from the file: REDIM array(39,39) ' Optional DEF SEG = VARSEG(array(0,0)) BLOAD "filename",VARPTR(array(0,0)) DEF SEG Jean --- * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
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