Field-Map Scripting

4.5.1.19 LoadFromFile

LoadFromFile procedure


Prototype:

procedure LoadFromFile(const FileName :string);

Description:

LoadFromFile procedure loads strings from a text file in the StringList.

Syntax:

StringList.LoadFromFile(FileName);


Part

Description


StringList

A reference to an instance of a TStringListWrapper


FileName

A string parameter represents a file name, txt file

Return value:

none



Example:


var

 strList1 : TStringListWrapper;

 t : string;


begin

 strList1 := CreateStringList;


 strList1.LoadFromFile('trees4.txt');


 t:= strList1.Text;


 ShowMsg(t);


 strList1.Free;

end.



Output in Field-Map Data Collector:



the text file with name trees4.txt



NOTE: the text file (trees4.txt) is stored in the directory Field-Map, see chapter Rewrite or SaveToFile.



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