mIRC Homepage
Posted By: sparta $calc - 30/06/07 09:59 AM
If i want to calc bytes to meg, would i use $calc(68915/1000) to get the value?
Posted By: qwerty Re: $calc - 30/06/07 10:38 AM
Looking for that in Google would be easier for you than posting and waiting for a reply (you'd also do a favour to the rest of the forum readers). Searching for the obvious terms megabytes bytes gives you the answer in the first two links.
Posted By: sparta Re: $calc - 30/06/07 10:57 AM
Well, i got the answer i looked for on irc, the answer was:

$bytes(68915,m) . and couldent find that on the net.
Posted By: vexed2 Re: $calc - 30/06/07 11:12 AM
I could of slapped you around a bit with a large trout after seeing your question.
You have hundreds of posts on here with similar code, and some very experienced code in terms of using $regex and such like, for you to post that question is such a waste of bandwidth on these forums, In terms of so many people doing it. but oh well

Code:
$bytes(68915).suf


didn't need an 'm'
Posted By: qwerty Re: $calc - 30/06/07 11:41 AM
$bytes() is well and good but it should be considered a convenience, not a substitute for gaps in understanding of basic things; knowing the relations between bytes, kb, mb etc is essential not only to every programmer/scripter, but to every computer user beyond the novice level. By not telling you about $bytes(), I hoped I'd make you learn these conversion rules from those Google results. I still hope that worked, despite you getting the $bytes() answer.


Quote:
and couldent find that on the net.
However you could find it in the help file, in the most obvious section for this: Text and Number Identifiers. I'm saying that to emphasise the importance of being able to find things out on your own, in the same (or even less) time it would take you to ask other people. This may not always be possible of course, but you should always try and find out; you have much more to gain from this in the long run.
© mIRC Discussion Forums