ToString (objectlist)

De Wiki1000

<source lang='delphi'>function ToString(iIndex:Integer; iCount:Integer; iPropName:string; iDoubleQuote:boolean):string</source>

Cette méthode retourne une chaîne liste de valeurs.

iIndex Index de départ
iCount Nombre max a retourner
iPropName Nom de l'attribut à sérialiser
iDoubleQuote Ajouter des quotes aux valeurs retourner


Pseudo code équivalent: <source lang="delphi">

function ToString(iIndex:Integer; aCount:Integer; iPropName:string; iDoubleQuote:boolean; const iSep:String=','):String; var indx:Integer; AStr,stag:string; isOID:boolean; begin

 isOID := SameText(iPropName,'oid') or SameText(iPropname,'InstanceOID');
 //
 Result := ; stag := ;
 indx := iIndex;
 if ACount=-1 then ACount := Count;
 while (indx<Count) and (ACount>0) do
   begin
     if isOID
       then AStr := OIDs[indx]
       else AStr := SafeVarToStr(Refs[indx].GetPropAsVariant(iPropName));
     if iDoubleQuote then AStr := Doublequote(AStr);
     Result := Result+stag+AStr;
     stag := iSep;
     Inc(indx);
     dec(ACount);
   end;

end;

</source>

Voir aussi:

{{#if:Listes d'objets (tech)|

{{#if:Listes d'objets (tech)|— Listes d'objets (tech) |}} — Développement DSM

|

{{#if:|— [[{{{1}}}]] |}} — Développement DSM

}}