Lasso Soft Inc. > Home

[ file->setposition ]

Method

Sets the position of the files read/write marker. Requires an integer line or character position (depending on the read mode) as a parameter. All subsequent reads and writes will occur at the given position.

  • Syntax
File Variable->SetPosition(Integer)
Examples
  • Beginner

To read characters from a file starting at a specified position:

Characters can be read starting at a set position using the [File->SetPosition] tag before the [File->Read] method. The example below reads 240 characters starting at character number 16.

Code

local(File = File('myfile.txt', File_OpenRead, File_ModeChar))
#File->SetPosition(16)
#File->Read(240)
#File->Close

Recent Comments

No Comments found

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