Storing arrays and types into a file

Blitz3D Forums/Blitz3D Programming/Storing arrays and types into a file

Hi there,

Does anyone know how to easily read/write arrays and types into a file. For example: WriteArray(f, arrayName), or typeName=ReadType(f)

Thanks in advance!

No. Write your own procedures for them.

Dim Array(50)

Function WriteArray(Stream,Size)
     For i = 0 To Size
          WriteInt Stream,Array(i)
     Next
End Functon


It's simple. As for types, you'd have to write your own procedure to read and write its fields. Unless you fancy string parsing: Str(TypeObject) (or was it String(..)?)

String parsing? Is that possible? Well, one way to find it out.

The writeArray is indeed very simple (should have thought about it myself :/ ). Thanks for waking me up.