mIRC Home    About    Download    Register    News    Help

Print Thread
#179914 30/06/07 09:59 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
If i want to calc bytes to meg, would i use $calc(68915/1000) to get the value?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #179915 30/06/07 10:38 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
qwerty #179916 30/06/07 10:57 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Well, i got the answer i looked for on irc, the answer was:

$bytes(68915,m) . and couldent find that on the net.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #179917 30/06/07 11:12 AM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
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'

Last edited by vexed2; 30/06/07 01:22 PM.
sparta #179920 30/06/07 11:41 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard