Multiple Record to One commont Record
This posting is direct to Rick at teamb, but if any one else wants to chime in
no problems. Rick from the first posting that I did you said that a untypes
parameter could be used, or a variant record. I decide to go the variant
record route, but am not having any good luck. Below is the relevant code
that I have tried to use.
--Declared record types.
type
TRequestMessage = RECORD
{ start of header portion for request }
SoftLock : Array [0..0] of Char; { 1-Lan2fep softlock }
{-- more record fields are defined here of array type --}
{ end of message body portion for request }
End;
TRequest38BMessage = RECORD
{ start of header portion for request }
MessageHeader : Array [0..30] of Char; { 31 - Message Header }
{-- more record fields are defined here of array type --}
{ end of message body portion for request }
End;
TMultiRecord = RECORD
Case Integer of
0:(RequestMessage: TRequestMessage);
1:(Request38BMessage: TRequest38BMessage);
End;
--Call to common routine.
gfBuildMessageHeader(nTraceNumber, MultiRec);
--Declared header on common routine.
Procedure gfBuildMessageHeader(VAR nTraceNumber: Word;
VAR MultiRecord: TmultiRecord);
The error message that I am getting is a Type MisMatch on the second parameter
of the call. I have tried putting packed on all three record types, but
still get the same error. I am using D1. Is that part of the problem.
THANKS ahead for the help.