RPC Broker TMult Example
From VistApedia
Revision as of 23:48, 3 July 2015 by Kdtop (talk | contribs) (Created page with " RPC Broker Help Home <h2>TMult Example</h2> The following program code demonstrates how to store and retrieve elements from a TMult variable: '''p...")
TMult Example
The following program code demonstrates how to store and retrieve elements from a TMult variable:
procedure TForm1.Button1Click(Sender: TObject); var Mult: TMult; Subscript: string; begin {Create Mult. Make Form1 its owner} Mult := TMult.Create(Form1); {Store element pairs one by one} Mult['First'] := 'One'; Mult['Second'] := 'Two'; {Use double quotes for M strings} Mult['"First"'] := '"One"'; {Label1.Caption will get "One"} Label1.Caption := Mult['"First"']; {Error! 'Third' subscripted element was never stored} Label1.Caption := Mult['Third']; end;