I need to find some way to create a function/class that works the same as the basic "GET" and "FIELD" commands.
Get: Read a specific record from a file into a buffer
Field: Basicly a fixed sized record which can be looked at different ways. (idea is kind of like a union)
Ex: RecordA size=10
Field RecordA, 10 as FULL_REC
Field RecordA, 5 as A, 5 as B
Field RecordA, 2 as A, 8 as B
I was thinking of implementing the "GET" by:
Reading it into a homemade string class.
Then implementing the "FIELD" by:
"Pointing" a homemade fixed length string at the specific index
Does anyone know of a premade translator that already (and correctly) translates these commands? Or does anyone have any ideas that could be helpful?
Thanks in advance!