HB_FGoTo

HB_FGoTo

Move record pointer to specific record in the selected text file

Syntax

      HB_FGoTo( nLine ) -> NIL

Argument

<nLine> : the record number to go to

Returns

NIL

Description

HB_FGoTo() moves the record pointer to a specific record in the file in the currently selected text file workarea. If the record number requested is greater than the number of records in the file, the record pointer will be positioned at the last record.

A text file “record” is a line of text terminated by a CRLF pair.

Example

      // read 5th line of text from file
      HB_FUse( ( "test.txt" )
      HB_FGoTo( (5)
      c1Line := HB_FReadLn()

Seealso

HB_FAtEOF(), HB_FEof(), HB_FGoBottom(), HB_FGoTop(), HB_FInfo(), HB_FLastRec(), HB_FReadAndSkip(), HB_FreadLN(), HB_FRecno(), HB_FSelect(), HB_FSkip(), HB_FUse()

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.