Project

General

Profile

$fread » History » Revision 5

Revision 4 (Per Amundsen, 12/13/2019 06:31 PM) → Revision 5/6 (Per Amundsen, 02/22/2023 04:53 PM)

_Added in 1.9.0_ 

 *$fread(name|N)* 

 Returns the next [[$crlf]] delimited line from an open file from the current position. 

 _See also [[/fopen]], [[/fclose]], [[/fwrite]], [[/fseek]], [[/flist]], [[$fgetc]], [[$feof]], [[$ferr]], [[$fopen]]._ 

 *Parameters* 

 name|N - Name of the file or the Nth file. 

 *Properties* 

 .back - Returns the previous [[$crlf]] delimited line from an open file from the current position. *(AdiIRC only)* 

 *Example* 

 <pre> 
 ; Open a file. 
 /fopen Example Example.txt 

 ; Add some text to the file. 
 /fwrite Example Hello World 

 ; Read the next line. 
 //echo -ag Next line is: $fread(Example) 

 ; Close the file. 
 /fclose Example 

 ; Delete the file. 
 /remove Example 
 </pre> 

 -------------------------------- 

 *$fread(name|N, M, &binvar)* 

 Reads M bytes from an open file to a &binvar. 

 *Parameters* 

 name|N - Name of the file or the Nth file. 
 M - Number of bytes to read from current position. 
 &binvar - The &binvar to read into. 

 *Properties* 

 .back - Returns M bytes from an open file to a &binvar backwards. (AdiIRC only)