Hi, I returned to hobby-programming after a while and feel more stupid than ever…
I have data which requires a record-like structure with various fields, something like this (but could be different as well; it’s just what I functionally need):
Type
myRecord = Record
myString : Array [0..n] of String;
myData : Array [0..n] of Integer;
…
Var
myR : Array [0..n] of myRecord;
What is the most efficient way for a beginner (beyond the primeval for..next approach in a function) to check
A. 1. whether one of the myString fields (where I can specify the field index, meaning that it could also be myString1, myString2, ...)
a) matches a text pattern (or, optionally,)
b) contains a text pattern;
A. 2. if it does, return the record index;
B. 1. whether the myData fields (where I can’t specify the field index, meaning that a full sub-array has to be searched)
a) is equal to a numeric value (a value is already contained in the array);
B.2. if it is, return the record index
Thank you for your time,
Cheers, and please be generous, the shame is mine...