mIRC Home    About    Download    Register    News    Help

Print Thread
help with a calculation (please) #243466 23/11/13 02:06 AM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
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.


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: help with a calculation (please) [Re: HorseC] #243467 23/11/13 02:28 AM
Joined: Jul 2006
Posts: 3,807
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,807
//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.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: help with a calculation (please) [Re: HorseC] #243468 23/11/13 02:33 AM
Joined: Jan 2004
Posts: 1,327
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,327
This function already exists as $bytes. To do it manually, you divide by 1024^x, not 1000^x.

Re: help with a calculation (please) [Re: Wims] #243469 23/11/13 04:15 AM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
thanks! via wickapedia i understood my problem, but your response makes it even easier. (as does other response i got).


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: help with a calculation (please) [Re: Loki12583] #243470 23/11/13 04:15 AM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
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).


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!