Hi guys and gals.
I am trying to store multiple blobs of 16 bytes - so I thought the easiest way would be to create a list.
Structure LayersStructure
List Data.i()
EndStructure
Global Dim Scenes.LayersStructure(100)
I now have an array with each element containing a Data() integer with a size of 0 - the question is - how do I put and pull data out of that Data() section?
Thanks!
Data inside a structure
Data inside a structure
----
R Tape loading error, 0:1
R Tape loading error, 0:1
Re: Data inside a structure
Not to worry,
I've changed it to
Now I can access with Scenes(0)\Data(0)
I've changed it to
Code: Select all
Structure LayersStructure
Array Data.i(64)
EndStructure
----
R Tape loading error, 0:1
R Tape loading error, 0:1
Re: Data inside a structure
Only as hint:
Code: Select all
Structure LayersStructure
Map Data.i()
EndStructure
Global Dim Scenes.LayersStructure(100)
Scenes(0)\Data("0") = 10
If FindMapElement(Scenes(0)\Data(), "0")
Debug Scenes(0)\Data()
EndIf
Re: Data inside a structure
em_uk wrote: I am trying to store multiple blobs of 16 bytes - so I thought the easiest way would be to create a list.
Code: Select all
;-TOP
Structure LayersStructure
StructureUnion
bArray.b[16] ; 0..15
aArray.a[16] ; 0..15
EndStructureUnion
EndStructure
Global Dim MyData.LayersStructure(100) ; 0 .. 100
MyData(0)\aArray[0] = 255
Debug MyData(0)\aArray[0] ; Unsigned
Debug MyData(0)\bArray[0] ; Signed
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive