mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 342
H
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Mar 2004
Posts: 342
the function $disk(1).size (in my environment my main drive)
returns a value of: 982474813440 bytes

I tried to convert this to GigaBytes and to TeraBytes, but must i have the value for the calculations wrong cause i get:
0.982475 TB

Could someone tell me right value to use to the right of the /
in the calc for both gig and mega byte values. thanks!
current:

/echo -a size: $calc($disk(1).size / 1000000000000 ) TB

Must be wrong, cause mircrosoft properties for the drive,
come up with different number for TB but reports same
value for bytes.

Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
//echo -a $bytes(982474813440,3dG).suf

is basically what you would use, see /help $bytes, G is giga, using T is not useful because the same result is returned, this is because there is not at least 1T.

Last edited by Wims; 23/11/13 02:32 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
This function already exists as $bytes. To do it manually, you divide by 1024^x, not 1000^x.

Joined: Mar 2004
Posts: 342
H
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Mar 2004
Posts: 342
thanks! via wickapedia i understood my problem, but your response makes it even easier. (as does other response i got).

Joined: Mar 2004
Posts: 342
H
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Mar 2004
Posts: 342
as i said to wims...


thanks! via wickapedia i understood my problem, but your response makes it even easier. (as does other response i got).


Link Copied to Clipboard