How to parse a custom message?
Posted: Fri Aug 22, 2014 3:49 pm
Hi,admin!
But I don't know how to parse a custom message.
procedure TForm1.Button12Click(Sender: TObject);
var
Msg: TdiZPI_Z01_24;
begin//use uCustom.pas
//MSH|^~\&|||||20140822231346||MFN^M01||P|2.4
//ZAU|||||||||ins carrier 5
//ZIN||con
try
Msg := TdiZPI_Z01_24.Create;
// Msg.EnableEscapedValues:=False;
Msg.AsString := Memo2.Text;
Memo1.Clear;
Memo1.Lines.Append(Msg.ZAU.inscarrier5.AsString);
Memo1.Lines.Append(Msg.ZIN.ifcondition.AsString);
finally
Msg.Free;
end;
This code can't parse customised message, could you tell me where is wrong?
But I don't know how to parse a custom message.
procedure TForm1.Button12Click(Sender: TObject);
var
Msg: TdiZPI_Z01_24;
begin//use uCustom.pas
//MSH|^~\&|||||20140822231346||MFN^M01||P|2.4
//ZAU|||||||||ins carrier 5
//ZIN||con
try
Msg := TdiZPI_Z01_24.Create;
// Msg.EnableEscapedValues:=False;
Msg.AsString := Memo2.Text;
Memo1.Clear;
Memo1.Lines.Append(Msg.ZAU.inscarrier5.AsString);
Memo1.Lines.Append(Msg.ZIN.ifcondition.AsString);
finally
Msg.Free;
end;
This code can't parse customised message, could you tell me where is wrong?