you know SizeOf(MyStruct)
you know OffsetOf(MyStruct/fieldName)
what about IndexOf(MyStruct,index.l)
a little snippet, for showing what i'm talking about:
Code: Select all
Structure PEOPLE
firstName.s
nickName.s
birthDate.s
comment.s
EndStructure
MyItem.PEOPLE
For i=0 To 3
Debug IndexOf(MyItem,i) ; for easy field-debugging
Next
line$ = ""
For i=0 To 3
line$ + IndexOf(MyItem,i) + Chr(10) ; for easy field-appending
Next
AddGadgetItem(#ListIcon,-1,line$)