Saving and loading structures in a file

redrocks

Member
Licensed User
Longtime User
Hi,

I an working on an application that uses some long structures containing different types of variables p.e:
Type Box(a As Byte,b As Int,c As String,d(10) As Int,...) and so on.
Dim test As Box

I would like to save the structure as a whole in a file for later loading also as a whole without parsing. Is it possible to do that in Basic4Android without parsing each variable?

I saw the option of saving Lists with the Files Library but it is text oriented and my data is binary but I did not see a simple way of doing this using any other library or routine.

Some help will be apreciated.
 

redrocks

Member
Licensed User
Longtime User
Hi Erel,

These are my structures, as you can see I have nested some inside the bigger one called "caja" , this one is the one to be saved and loaded on the file.

Type Crossover(TipoHP As Byte,SlopeHP As Byte,FrecHP As Int,TipoLP As Byte,SlopeLP As Byte,FrecLP As Int)

Type GEQ (Bypass As Byte,Level(30) As Byte)

Type PEQ (Level(8) As Byte,BW(8) As Byte,Frec(8) As Int)

Type Limiter (Thres As Byte,Att As Byte, Rel As Byte,Bypass As Boolean)

Type Caja (MuxInA As Byte,MuxInB As Byte,LevelNoise As Byte,LevelInA As Byte,LevelInB As Byte,GEQA As GEQ,GEQB As GEQ,DelayA As Int,DelayB As Int,CrossA As Crossover,CrossB As Crossover,PEQA As PEQ,PEQB As PEQ,LevelOutA As Byte,LevelOutB As Byte,PhaseA As Byte,PhaseB As Byte,LimA As Limiter,LimB As Limiter,Earth As Byte, ID As Byte,IP As String)
'--------------------------------------------------------------------------
Dim Box As Caja

Thanks and regards
 
Upvote 0
Top