Is there a way I can load different record type objects using one procedure?

 

I have

 

TType1 = record

            intone: integer;

            strone: array[1..49] of char;

end;

 

TType2 = record

            strtwo: array[1..49] of char;

            Inttwo: integer;

end;

 

These types are stored as files on my system, but I want to have one procedure/function that can load either type by simply passing the path, can you do this.

 

I have something like

 

Procedure LoadTemplate(Path: String; var Data: array of char);

 

But this doesn’t work as the type and array are not compatible.

 

I think this could be a Monday morning thing, but I have had two coffee’s!!!!

 

Jason

Reply via email to