|
|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
My mIRC version: 6.03
//echo -a $calc(0/0) * /echo: insufficient parameters
//echo -a $calc(1/0) * /echo: insufficient parameters
I know mIRC isn't a math software. :tongue:
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Division by 0 is undefined resulting in mIRC returning $null. That is 100% mathematically valid, so I'm not sure what you are talking about.
|
|
|
|
Joined: Jan 2003
Posts: 150
Vogon poet
|
Vogon poet
Joined: Jan 2003
Posts: 150 |
$me thinks everything is OK
Go ahead, jump. 100,000 lemmings can't be wrong.
|
|
|
|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
//echo -a 1 $+ $calc($calc(0/0)/1) $+ 1 101
//echo -a 1 $+ $calc($null/1) $+ 1 11
If $calc(0/0) is equal to $null then why it happens?
|
|
|
|
Joined: Jan 2003
Posts: 150
Vogon poet
|
Vogon poet
Joined: Jan 2003
Posts: 150 |
0 = "0" & $null = ""
that's the way it works
Go ahead, jump. 100,000 lemmings can't be wrong.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
I get '101' for both of those.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2002
Posts: 12
Pikka bird
|
OP
Pikka bird
Joined: Dec 2002
Posts: 12 |
In mIRC 6.1: //echo -a $calc($null/1) returns "0" //echo -a $calc($calc(0/0)/1) returns "0"
In mIRC 6.03: //echo -a $calc($null/1) returns "* /echo: insufficient parameters" //echo -a $calc($calc(0/0)/1) returns "0"
That's what I'm talking about. Sorry for post things about an old mIRC version.
|
|
|
|
Joined: Dec 2002
Posts: 5,365
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,365 |
In mIRC v6.1, $calc() will return zero if you specify non-numeric parameters.
Last edited by Khaled; 08/09/03 01:17 PM.
|
|
|
|
Joined: Dec 2002
Posts: 39
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 39 |
not that true, in my mIRC v6.1, //echo -a $calc(1/0) results in: * /echo: insufficient parameters
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Try reading, if you specify non-numeric parameters. 1 and 0 are both numeric characters.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 39
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 39 |
khaled edited his post, but I am almost sure he said it returns 0 for divisions by 0 AND not numeric parameters before :P
|
|
|
|
Joined: Dec 2002
Posts: 5,365
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,365 |
Larra: yes it did, sorry about that!
|
|
|
|
|
|