Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Ancient Arrays

Author
Message
Zorcan
13
Years of Service
User Offline
Joined: 10th Jan 2011
Location:
Posted: 10th Jan 2011 21:26
I was last involved with DB about 10 years ago. I wrote several successful programs that used the array load and save commands with mutli-dimensional integer arrays.

I have recently started using the current DB trial version and find that when loading the old files saved back then the array is filled with zeroes.

If I create a bew saved array file now, it will load properly.

I can correctly read the old array files by opening the file for input and reading one value at a time.

Any ideas what the problem is and how to fix it (other than by reading values in one at a time) ?
Agent
20
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 11th Jan 2011 23:26
In ten years, it's almost certain that the internal function of each command has changed at least a little. It's like changing one of your own programs that you wrote ten years ago, and still expecting it to read your old data files.

I'd say the array load and save commands have been updated, bugfixed, or otherwise adjusted at some point in the last ten years and the change has made old files incompatible with the new version of the command. You have to make new files, or continue to load them in value for value.
Zorcan
13
Years of Service
User Offline
Joined: 10th Jan 2011
Location:
Posted: 16th Jan 2011 14:25
Thanks for your response.

I've worked around the problem by reading the old file into my array one element at a time then using save array command to create a new file.

This loads ok using load array command - the file is almost exactly twice the size of the original one!

Login to post a reply

Server time is: 2024-11-24 08:44:44
Your offset time is: 2024-11-24 08:44:44