mIRC Home    About    Download    Register    News    Help

Print Thread
#50973 23/09/03 08:27 PM
Joined: Jun 2003
Posts: 67
D
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
Other then $cr and $lf being preserved what other purposes does saving a hash in binary offer?


while (demi == nub) {
inc %skill
}
#50974 23/09/03 08:50 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
I think that's the only benefit a binary file offers.

#50975 24/09/03 07:58 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Anything a &binvar offers, I guess. Like preserving multiple spaces, too. But I'm not really sure if they'll be preserved when loaded as well.

Last edited by cold; 24/09/03 07:59 PM.

* cold edits his posts 24/7
#50976 25/09/03 12:01 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Saving/loading a hash table as text will preserve spaces. The lack of consecutive spaces is a quirk of mIRC involving space-tokenizing lines given to it via the command line or a script file, but since each value of a hash table is saved and loaded internally the consecutive spaces aren't stripped.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#50977 27/09/03 04:08 AM
Joined: Sep 2003
Posts: 38
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
It also preserves NULs (ASCII 0s), which is useful if you need to use a binary file in your script correctly.

#50978 27/09/03 10:26 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Unfortunately it doesn't frown

//bset &a 1 65 0 66 | hadd -mb table item &a | echo 3 -s $hget(table,item,&b) : $bvar(&b,1-) | hsave -bo table table.hash | hload -b table table.hash | echo 4 -s $hget(table,item,&b) : $bvar(&b,1-) | .remove table.hash


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard