Results Property

Example


Applies to
TRPCBroker component

Declaration

property Results:  TStrings

Description
This property contains the results of a Call method. In the case where the RPC returns a single value, it will be returned in Results[0]. If a call returns a list of values, the Results property will be filled in the order the list collates on the server. The Results property can only contain values of array elements – subscripts are not returned.

For example:

On the server, the M routine constructs the list in the following sequence:

S LIST("CCC")="First"
S LIST(1)="Second"
S LIST("AAA")="Third"
S LIST(2)="Fourth"

Before Broker returns the list to the client, M will re-sort it in alphabetical order:

LIST(1)="Second"
LIST(2)="Fourth"
LIST("AAA")="Third"
LIST("CCC")="First"

On the client, the Results property will contain the following:

RPCBroker1.Results[0]=Second
RPCBroker1.Results[1]=Fourth
RPCBroker1.Results[2]=Third
RPCBroker1.Results[3]=First