[futurebasic] Re: [FB] Re: Writing Numericals to Disk

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2007 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Wed, 3 Oct 2007 20:18:53 -0500
Skip,

Welcome! FYI, there are a bunch of us out here just itching to have  
somebody ask some questions to which we might know some answers. We  
may be behind the curve on the cutting-edge stuff, but we know the  
BASIC part of FB inside out!

I'm not clear what you are trying to do with your arrays, but the  
most common (and fastest) way of writing arrays to disk is probably  
WRITE FILE. It works out something like this (pseudo-code):
WRITE FILE DeviceID, startAddr, numBytes

DeviceID is the ID used when you opened the disk file (I usually just  
use 1)
startAddr is the beginning of your array, which you can get with    
@theArray(0)
numBytes is the length of the array in memory. Calc it with SIZEOF 
(theArray(0)) * numberOfCellsInArray

Remember that the number of cells will be 1 more than the number in  
the array DIM statement to accommodate cell 0.

To get the array back from disk, you just reverse the process using
READ FILE DeviceID, startAddr, numBytes

Don't hesitate to ask if/when you need more

HTH

   e-e
   =J= a  y
    "

On Oct 3, 2007, at 3:43 PM, Harold Boone wrote:

>
> On Oct 3, 2007, at 3:21 PM, Brian Stevens wrote:
>
>> First: A big wow! What a rapid response and so much help already.
>> Thank you sooooo much!
>
>
> I am working on a Mac G4, OS 10.3.9.
>
> Yes, I have FB, release 4.
>
> I will respond being more specific as soon as I digest what you  
> have sent/
>
> The two books I was referring to are: 1. Switching to FutureBasic  
> by Chris Stasny and 2. Learning FutureBasic by Frank Turovich.
>
> I have talked with Mr. Stasny briefly on the phone and have sent  
> him a couple of e-mails. He was very kind and helpful but I know he  
> is very busy and I hate to bother him.
>
> The manual is the reference manual that I ordered with the FB  
> software.A reply with details will help the list guide you better.   
> HTH..
>
>
> Again, thank you ever so much and I will be responding in more  
> detail shortly.
>
>
> Skip
>
> --
> To unsubscribe, send ANY message to: futurebasic- 
> unsubscribe@...
>