Field-Map Scripting

4.5.1.12 Count

Count function


Prototype:

function Count :integer;

Description:

Count function returns a number of strings from the StringList.

Syntax:

variable:= StringList.Count;


Part

Description


variable

A variable declared as an integer


StringList

A reference to an instance of a TStringListWrapper

Return value:

an integer represents a number of strings in the StringList



Example:


var

 strList1 : TStringListWrapper;

 i : integer;


begin

 strList1 := CreateStringList;


 strList1.BeginUpdate;

 strList1.Add('Picea');

 strList1.Add('Fagus');

 strList1.Add('Pinus');

 strList1.EndUpdate;


 i:= strList1.Count;


 ShowMsg(IntToStr(i));


 strList1.Free;

end.



Output in Field-Map Data Collector:



See also:

Free; Duplicates; Sorted; CaseSensitive; BeginUpdate; EndUpdate; Add; AddStrings; Assign; Clear; Delete; Count; Exchange; Move; Find; IndexOf; Insert; Sort; LoadFromFile; SaveToFile; Strings; Text; Delimiter; DelimitedText; NameValueSeparator; IndexOfName; Name; Value; AsVarArray