Project

General

Profile

$fread » History » Version 6

Per Amundsen, 02/22/2023 04:57 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$fread(name|N)*
4
5 2 Per Amundsen
Returns the next [[$crlf]] delimited line from an open file from the current position.
6 1 Per Amundsen
7 5 Per Amundsen
_See also [[/fopen]], [[/fclose]], [[/fwrite]], [[/fseek]], [[/flist]], [[$fgetc]], [[$feof]], [[$ferr]], [[$fopen]]._
8
9 1 Per Amundsen
*Parameters*
10
11 6 Per Amundsen
table(ktable).
12
|*Parameter*|*Description*|
13
| name<notextile>|</notextile>N | Name of the file or the Nth file. |
14 3 Per Amundsen
15 1 Per Amundsen
*Properties*
16
17 6 Per Amundsen
table(ktable).
18
|*Property*|*Description*|
19
| .back | Returns the previous [[$crlf]] delimited line from an open file from the current position. *(AdiIRC only)* |
20 3 Per Amundsen
21 1 Per Amundsen
*Example*
22
23
<pre>
24
; Open a file.
25
/fopen Example Example.txt
26
27
; Add some text to the file.
28
/fwrite Example Hello World
29
30
; Read the next line.
31
//echo -ag Next line is: $fread(Example)
32
33
; Close the file.
34
/fclose Example
35
36
; Delete the file.
37
/remove Example
38
</pre>
39 2 Per Amundsen
40
--------------------------------
41
42
*$fread(name|N, M, &binvar)*
43 1 Per Amundsen
44
Reads M bytes from an open file to a &binvar.
45
46
*Parameters*
47
48 6 Per Amundsen
table(ktable).
49
|*Parameter*|*Description*|
50
| name<notextile>|</notextile>N | Name of the file or the Nth file. |
51
| M | Number of bytes to read from current position. |
52
| &binvar | The &binvar to read into. |
53 2 Per Amundsen
54 1 Per Amundsen
*Properties*
55 3 Per Amundsen
56 6 Per Amundsen
table(ktable).
57
|*Property*|*Description*|
58
| .back | Returns M bytes from an open file to a &binvar backwards. (AdiIRC only) |