[futurebasic] RE: [FB] Complex file save

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 1999 : Group Archive : Group : All Groups

From: Chris.Young@...
Date: Thu, 18 Feb 1999 09:40:09 -0600
David,

Two or three years ago (maybe longer), Mars posted a reply to the Ariel 
forums, I believe, on a question that I had asked him regarding save 
strategies, including bakcwards compatibility. I looked around on my 
machine, and can't find the post (I know I saved it somewhere!). At any 
rate, the gist of his strategy is this:

preface each record or chunk of data with a header structure:

1) long offset in bytes to the beginning of the next record
2) some sort of ID... short integer so you can identify diff types of 
data, if necessary
3) short offset to beginning of data for THIS record
4) size of THIS record

Then, read the data into predefined structures, or whatever else you 
want to do. Because of the type ID, a newer version of the program can 
read an older file, and an older version of the program can still read 
a newer file, as long as you do not change predefined structures, but 
instead add a different type to handle additional info.

I will see iff I can find the original response and post it, cuz it was 
really quite good.

Chris Young

On Wednesday, February 17, 1999 6:53 PM, David.Cottrell 
[SMTP:David.Cottrell@...] wrote:
> This is just to run through some ideas on how to save some data.
>