I am trying to make a specific file format for a Delphi project of mine. It is simply a file consisting of records. However, I would like to include multiple record types. I want the first record to be a header record, and the rest of the records to be "normal" records. Basically, the structure of the file would be a THeaderRec followed by an undefined number of TDataRecs. Normally when I work with files made up by records, it is pretty easy, as I can just use TheFile: file of TSomeRecord and take it from there. But that doesn't seem like a viable solution when there are multiple types of records present. It doesn't appear too difficult, but I really don't know much about file input/output. So, can anyone help me with this?
Thank you in advance!