If you can tell what kind of type it is from the path then just pass in a
pointer and cast the contents of the pointer to the appropriate type.
Phil.
----- Original Message -----
From: Jason Coley
To: Multiple recipients of list delphi
Sent: Monday, October 14, 2002 10:29 AM
Subject: [DUG]: Load different types from one procedure?
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
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/