mIRC Home    About    Download    Register    News    Help

Print Thread
#74634 09/03/04 08:04 PM
Joined: Sep 2003
Posts: 38
O
Olathe Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
/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.

#74635 09/03/04 08:15 PM
Joined: Feb 2004
Posts: 124
T
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
starbucks_mafia
ahhh k got it .. thx for clearin that up.

Olathe
good point

Last edited by TonyTheTiger; 09/03/04 08:38 PM.
#74636 09/03/04 08:29 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#74637 09/03/04 08:51 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

#74638 13/03/04 12:37 AM
Joined: Sep 2003
Posts: 38
O
Olathe Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
No, it also removes the line if it is not a number.

#74639 13/03/04 12:48 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
* tidy_trax fixes a few of his scripts shocked


New username: hixxy

Link Copied to Clipboard