mIRC Homepage
Posted By: Olathe /write -l0 - 09/03/04 08:04 PM
/write -l0 will overwrite the first line of a file. This is disastrous if someone uses $readn to find and delete or overwrite a line without checking to see if $read succeeded.

Plus, it doesn't make sense to delete the 0th line.
Posted By: TonyTheTiger Re: /write -l0 - 09/03/04 08:15 PM
starbucks_mafia
ahhh k got it .. thx for clearin that up.

Olathe
good point
Posted By: starbucks_mafia Re: /write -l0 - 09/03/04 08:29 PM
The point he's making is that people might use $readn in a script to overwrite a line just read, and then if the read fails they'll end up overwriting the first line.
Posted By: Online Re: /write -l0 - 09/03/04 08:51 PM
I would expect -l0 to replace the first line only if it's a number (which represents the amount of lines), seeing how $read(file,0) works exactly in the same way.
Posted By: Olathe Re: /write -l0 - 13/03/04 12:37 AM
No, it also removes the line if it is not a number.
Posted By: tidy_trax Re: /write -l0 - 13/03/04 12:48 AM
* tidy_trax fixes a few of his scripts shocked
© mIRC Discussion Forums