FIO.Gets

Previous  Next

 

string = FIO.Gets( file-id AS INTEGER ) AS STRING

 


 

Reads one line from a previously opened text file and returns contents to string.

 

Example:

 

$LIBRARY "MyBASIC2_ExtLib.dll"

 

i=fio.create("d:\fff.txt")

 

IF i > -1 THEN

  PRINT fio.puts( i, "Kalle Anka was here today" ),

  fio.close(i)

ENDIF

 

i=fio.open("d:\kalle.txt")

 

if i > -1 THEN

  WHILE fio.eof(i) = 0

     str$=fio.gets( i )

     PRINT str$

  WEND

  fio.close(i)

ENDIF

 

END