file_text_eof

Check the current read position of a file to see if the end has been reached.

Syntax:

file_text_eof(fileid);


Argument Description
fileid The id of the file to check.


Returns: Boolean


Description

This function returns true when the end of a given opened text file has been reached or false if not.


Example:

var num = 0;
file = file_text_open_read(working_directory + "\Game_Data.txt");
while (!file_text_eof(file))
   {
   str[num++] = file_text_readln(file);
   }
file_text_close(file);

The above code opens a file for writing then loops through the lines of text already written to the file until it reaches the end, storing each line in the array "str".


Back: Text Files
Next: file_text_close
© Copyright YoYo Games Ltd. 2018 All Rights Reserved