Lasso Soft Inc. > Home

[File->ReadString]

[File->ReadString] reads string data from a file. If a character set has been set using [File->SetEncoding] then that character set is used to translate data from the file into Lasso's string format. Alternately, [File->Read] can be used to read a byte stream from a file.

The tag requires a single parameter which specifies how many bytes of data to read from the file. In files that contain multi-byte data this number may not correspond to the number of characters which will be read from the file.

  • Syntax
  • Parameters
[Var: 'myFile' = (File: 'myfile.txt')]
[$myFile->(SetEncoding: 'iso-8859-1')]
[$myFile->(Write: 'Data')]
[$myFile->(ReadString: 32768)]
Optional Parameters
Length The maximum length in bytes of data to read from the file.
Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Tag Link [File->ReadString] Category File
Type Member Data Source Any
Support Preferred Version 8.5
Output Type String Security None
Implementation Sets Lasso 8.5

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft