Recently I had an interesting and frustrating experience. In the program I have been continuously working on for three decades a couple of odd things happened.
There is little doubt that SuperCard is, at its heart, a database. Lines can be thought of as records, and items as fields, and windows as tables. The Find command can quickly locate any record
With the current setup, a window with a single background with a single field becomes the table and is named by the dataType stored therein. Setting lineDel and itemDel to ASCII's database characters {FS (ASCII 28), aka File Separator; GS (ASCII 29), aka Group Separator; RS (ASCII 30), aka Record Separator; and US (ASCII 31) aka Unit Separator} allows virtually all text characters to be stored in any field of any record. I define the first field of a record as the record's ID which is unique to the record. The Find command can quickly locate any record using its ID.
This method produces dramatically smaller programs as the overhead of a card per record does not exist.
I limit the the data in the bg fld to 2^20 characters and 2^14 records. When either limit is reached a new card is created.
Building a record is just a matter of recording data according to the dataType's field list which is stored as a userProperty named uFields. No need to type the fields as Supercard stores all numbers as text anyway.
When building the record each field is appended by an itemDel (aka field delimiter). Of course, the last field will automatically be appended with a lineDel (aka record delimiter), so it doesn't need an itemDel. To determine if a record is valid, I do two things: determine that the DataID is unique and that the number of fields matched the number of lines in the field list.
Of course, empty fields can exist. Oops! If the last field is empty, then the count of fields will not equal the number of fields.
Solution: Ensure that the last field always has something in it, but that defeats the empty field idea. However, if a null character is placed in the last field, it will not be empty. The caveat is that when reading the field one will have to replace the null with empty.
Hope the readers follow what I am trying to explain.