I am trying to use the record structure to store in a single place collections of data of different elementary types. I was hoping to make lists (or perhaps sets) of these records, but my approach doesn't work. Would anyone be able to offer some help, please? I present below some minimalist code that doesn't do what I was hoping for. The idea was to use as a placeholder a one-dimensional version of the record. I would then cycle through various sets of data, populating the record and adding to the list the record as it then existed.
A:array(STRINGSET) of integer
LIST_RECORDS:list of RECORDTYPE
The output I get is as follows:
I think that the list refers directly to INDIVIDUAL_RECORD, rather than having taken its contents: the list contains n copies of the last-added entry, where n is the number of loops. Is what I tried to do possible for non-basic entries, such as my record? One way around this would be to have not a placeholder, but an array of records, with the list referring to its various elements.
Any help that can be offered on this or other approaches would be greatly appreciated.