[solved] Reading data from an array by pointer
Posted: Sun May 05, 2024 9:35 am
Hi, all.
This way I can read data from the array by the base pointer to it:
So...
What if I have a structured array ? For example, I need to get both a string and an id at once.
Thank you in advance.
This way I can read data from the array by the base pointer to it:
Code: Select all
Procedure ReadArray(*strings, size)
*ptr = *strings
For i=1 To size
Debug PeekS(PeekL(*ptr))
*ptr+SizeOf(integer)
Next
EndProcedure
Dim Strings.s(5)
Strings(0) = "AAA"
Strings(1) = "AAB"
Strings(2) = "AAC"
Strings(3) = "ABA"
Strings(4) = "ABB"
ReadArray(@strings(), 5)What if I have a structured array ? For example, I need to get both a string and an id at once.
Thank you in advance.