Difference between revisions of "RPC HELP TMult Subscript Example"

From VistApedia
Jump to: navigation, search
(Created page with " RPC Broker Help Home <h2>Subscript Example</h2> Back The following program code demonstrates how to get the subscript of an...")
 
 
Line 2: Line 2:
 
<h2>Subscript Example</h2>
 
<h2>Subscript Example</h2>
  
[[RPC_HELP_TMult_Subscript|Back]]
+
[[RPC_HELP_Mult_Subscript|Subscript]]
  
 
The following program code demonstrates how to get the subscript of an item in a TMult variable:
 
The following program code demonstrates how to get the subscript of an item in a TMult variable:

Latest revision as of 23:39, 3 July 2015

RPC Broker Help Home

Subscript Example

Subscript

The following program code demonstrates how to get the subscript of an item in a TMult variable:


   procedure TForm1.Button1Click(Sender: TObject);
   var
     Mult: TMult;
   begin
     {Create Mult. Make Form1 its owner}
     Mult := TMult.Create(Form1);
     Label1.Caption := 'The subscript of the item at position 1 is ' +
     {will be empty since the list is empty}
     Mult.Subscript(1);
     Mult['Second'] := 'Two';
     Label1.Caption := 'The subscript of the item at position 1 is ' +
     {will be empty. Only one item in list so far at 0th position}
     Mult.Subscript(1);
     Mult['Third'] := 'Three';
     Label1.Caption := 'The subscript of the item at position 1 is ' +
     {will be Third}
     Mult.Subscript(1);
   end;