[Pas2js] command to read line by line
Michael Van Canneyt
michael at freepascal.org
Sun Oct 17 11:29:34 CEST 2021
On Sat, 16 Oct 2021, Mgr. Janusz Chmiel wrote:
> Do you think, that it would be too complex to develop special command, which can read plain text file line by line by using for cycle and array?
> Does such command exist in Pas2JS systém unit or in some other unit? I need to read line by line, no whole file to A variable.
No, such a command does not exist. What you can do is read the file in a
stringlist and then read the stringlist line by line. The LoadFromURL and
LoadFromFile commands exist, and both accept a URL to actually load a file.
You must include the unit Rtl.BrowserLoadHelper in the uses clause for this to work.
(or use the browserapp unit)
More information about the Pas2js