mIRC Home    About    Download    Register    News    Help

Print Thread
#34064 04/07/03 02:10 PM
Joined: Jul 2003
Posts: 24
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 24
I've found a bug with $read, if you read a file that begins with a number, the first line will be 0, the second will be 1, etc.

edit:
this bug occured in v6.03

Last edited by cdwriter; 04/07/03 02:12 PM.
#34065 04/07/03 02:12 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
From the mIRC help file:
If the first line in the file is a number, it must represent the total number of lines in the file. If you specify N = 0, mIRC returns the value of the first line if it's a number

#34066 04/07/03 02:15 PM
Joined: Jul 2003
Posts: 24
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 24
why is that good?...

#34067 04/07/03 04:19 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Because determining how many lines are in a file is VERY slow. So if you can tell mIRC this information up front, it makes processing much faster. In addition to what Collective said, since you don't want this feature, mIRC lets you disable it. $read(the.file,t,1) The 't' flag tells mIRC you want it to treat the first line as plain text even if it is a number.


Link Copied to Clipboard