List of 'records'

enonod

Well-Known Member
Licensed User
Longtime User
[EDIT] Sorry, I just found Type.

I am used to using a 'record' as an object with say three fields and then storing the records in a List that has random access for adding/removing. The familiar List seems to be available as a container but no record class nor can I see a way to construct such a class.

Any suggestions please?
 
Last edited:

mjtaryan

Active Member
Licensed User
Longtime User
[EDIT] Sorry, I just found Type.

I am used to using a 'record' as an object with say three fields and then storing the records in a List that has random access for adding/removing. The familiar List seems to be available as a container but no record class nor can I see a way to construct such a class.

Any suggestions please?

I'm like you, I'm used to a generic predefined type of Record that is then used to define the record structure. It seems to me that the Type keyword in B4A does the same thing, even though the visual declaration is somewhat different than what we'd be used to. I've been working on the following, which I think will work. (the underscrores are indentations)

Type AddrRec (
__Name as String,
__Addr1 as String,
__Addr2 as String,
__City as String,
__State as String,
__Zip as String
) 'Defines a "Record" Type (I don't know whether I can break up the line in this way. It may have to be on one wrapped line.)

It would be helpful if B4A had a predefined Record so the first part of the above example would read Type AddrRec as Record".
 
Last edited:
Upvote 0
Top