HB_FReadAndSkip()
Reads the current line and moves the record pointer to the next line / record
Syntax
HB_FReadAndSkip() --> cLine
Argument
None
Return
The current line in the currently selected text file as a character string.
Description
HB_FReadAndSkip() reads the current line in the currently selected text file and advances the record pointer to the next line.
Example
// The example fills an array with the lines of a text file, // taking advantage of implicit record pointer movement of // function HB_FReadAndSkip(). PROCEDURE Main LOCAL cFile := "Textfile.txt" LOCAL aLines, nLine := 0, nCount LOCAL nFile nFile := HB_FUse( cFile ) nCount := HB_FLastRec() + 1 aLines := Array( nCount ) DO WHILE ++nLine <= nCount aLines[ nLine ] := HB_FReadAndSkip() ENDDO HB_FUse() AEval( aLines, {|cLine| QOut( cLine ) } ) RETURN
Seealso
HB_FAtEOF(), HB_FEof(), HB_FGoBottom(), HB_FGoto(), HB_FGoTop(), HB_FInfo(), HB_FLastRec(), HB_FreadLN(), HB_FRecno(), HB_FSelect(), HB_FSkip(), HB_FUse()