mIRC Home    About    Download    Register    News    Help

Print Thread
#47849 07/09/03 04:14 PM
G
Gojito
Gojito
G
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:

#47850 07/09/03 04:27 PM
C
codemastr
codemastr
C
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.

#47851 07/09/03 04:46 PM
Joined: Jan 2003
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 149
$me thinks everything is OK

#47852 07/09/03 11:08 PM
G
Gojito
Gojito
G
//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?

#47853 07/09/03 11:11 PM
Joined: Jan 2003
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 149
0 = "0"
&
$null = ""

that's the way it works

#47854 08/09/03 12:20 AM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
I get '101' for both of those.

#47855 08/09/03 09:49 AM
G
Gojito
Gojito
G
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.

#47856 08/09/03 12:18 PM
Joined: Dec 2002
Posts: 3,841
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,841
In mIRC v6.1, $calc() will return zero if you specify non-numeric parameters.

Last edited by Khaled; 08/09/03 01:17 PM.
#47857 08/09/03 12:29 PM
L
Larra
Larra
L
not that true, in my mIRC v6.1, //echo -a $calc(1/0) results in: * /echo: insufficient parameters

#47858 08/09/03 04:08 PM
C
codemastr
codemastr
C
Try reading, if you specify non-numeric parameters. 1 and 0 are both numeric characters.

#47859 08/09/03 04:23 PM
P
pheonix
pheonix
P
he edited it.

#47860 09/09/03 01:12 AM
L
Larra
Larra
L
khaled edited his post, but I am almost sure he said it returns 0 for divisions by 0 AND not numeric parameters before :P

#47861 10/09/03 01:25 PM
Joined: Dec 2002
Posts: 3,841
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,841
Larra: yes it did, sorry about that!


Link Copied to Clipboard