mIRC Homepage
Posted By: HorseC help with a calculation (please) - 23/11/13 02:06 AM
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.
Posted By: Wims Re: help with a calculation (please) - 23/11/13 02:28 AM
//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.
Posted By: Loki12583 Re: help with a calculation (please) - 23/11/13 02:33 AM
This function already exists as $bytes. To do it manually, you divide by 1024^x, not 1000^x.
Posted By: HorseC Re: help with a calculation (please) - 23/11/13 04:15 AM
thanks! via wickapedia i understood my problem, but your response makes it even easier. (as does other response i got).
Posted By: HorseC Re: help with a calculation (please) - 23/11/13 04:15 AM
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).
© mIRC Discussion Forums