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.

DarkBASIC Professional Discussion / Saving Multiple Arrays

Author
Message
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 12th Sep 2003 16:58
I have four arrays that I need to save to a file:

Array1$(a, b, 2)
Array2$(c, 6)
Array3$(d)
Array4$(e)

As you can see they are all various sizes. I wondered if it is possible to use the SAVE ARRAY command to save more than one array to the same file? If not, does anyone have any suggestions as I just need to finish this and I can release my baby!!!

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 12th Sep 2003 18:58
Unless it's been recently added, I requested "write array" about 2 years ago. Plus a list of array functionality, But to date, it's never appeared.

In mean time, you can either just dump the arrays with load/save array, or if you really want to have 1 save file. You'll need to Iterate through the array manually..

There's other solutions of course, like saving the array to disc, and then load them into a memblock so you can save it (just need a header on the front of the file/sections). But it's all equally messy.

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]

Login to post a reply

Server time is: 2026-07-24 14:08:30
Your offset time is: 2026-07-24 14:08:30