mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
I'm not an expert when it comes to math, but based on a conversation on IRC about the following calculation:

Code:
//var %c = 48 / 2 (9 + 3) | //say $calc(%c)


mIRC returns it as 24 despite the protest of one person that it [the correct answer] is in fact 288 (or two.)

Google also confirms that the calculation is 288.

Quote:
[00:36:03] <+Jigsy> .g 48 / 2 (9 + 3)
[00:36:04] <%^> (48 / 2) * (9 + 3) = 288


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Jul 2006
Posts: 4,158
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,158
$calc doesn't handle implicit multiplication, it stops at 48/2 because it sees the '(' as an invalid syntax


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, you must include all operators.

48 / 2 * (9 + 3)


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard