How to save an array?

Blitz3D Forums/Blitz3D Programming/How to save an array?

ZombieWoof is correct.

Here is how I would save/load an integer array. Sadly you cannot pass an array as a function :/

Dim MyArray(100)

file=WriteFile("MyArray.dat")
For a=0 to 100
 WriteInt file,MyArray(a)
Next
CloseFile file

file=OpenFile("MyArray.dat")
For a=0 to 100
 MyArray(a)=ReadInt(file)
Next
CloseFile file

I wrote this in browser so it might be buggy