mIRC Homepage
Posted By: maroon $bytes 't' switch - 22/12/21 05:21 PM
re: https://forums.mirc.com/ubbthreads.php/topics/269577/edge-cases-with-bytes

I see the new beta shows $bytes().suf showing PB for large inputs. However this has affected the 't' switch, which now outputs the quantity of terabytes, which causes the 't' switch to replicate the behavior of the unmentioned new 'p' switch:

//var -s %a $calc(1*1024^4) | echo -a $bytes(%a,g) vs $bytes(%a,t) vs $bytes(%a,p) vs $bytes(%a).suf

result: 1,024 vs 0.00098 vs 0.00098 vs 1TB
should be: 1,024 vs 1 vs 0.00098 vs 1TB

//var -s %a $calc(1*1024^5) | echo -a $bytes(%a,g) vs $bytes(%a,t) vs $bytes(%a,p) vs $bytes(%a).suf
result: 1,048,576 vs 1 vs 1 vs 1PB
should be: 1,048,576 vs 1,024 vs 1 vs 1PB
Posted By: Khaled Re: $bytes 't' switch - 23/12/21 08:58 AM
Thanks for testing this. This issue has been fixed for the next beta.
© mIRC Discussion Forums