Link to home
Start Free TrialLog in
Avatar of smitje
smitje

asked on

Variable RecordTypes as parameter for procedures

Is it anyway possible to have different/variable RecordTypes as input parameter for procedures?

Lets say I wanted to make a standard procedure for reading/writing records to 'files of recordtypes', is that possible like this or is there an easier way?
ASKER CERTIFIED SOLUTION
Avatar of ow
ow

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello Y'all...

This couple of lines...

if (FileStream.Write(DataRec, SizeOf(DataRec)) = SizeOf(DataRec)) then
       WriteLn('Ok')
     else
       WriteLn('Error');

should be as follows,,,,

if (FileStream.Write(DataRec, SizeOf(DataRec)) = SizeOf(DataRec)) then
       WriteLn(F, 'Ok')
     else
       WriteLn(F, 'Error');

Cheers,
Viktor