in reply to Re^2: Weird behavior of int()
in thread Weird behavior of int()
Unfortunately that just isn't the way perl defines things. Perl has no distinction between float/int - not even when int() function is used. Perl scalars essentially have 3 basic flavours: number/string/reference.
Inf and NaN are valid numbers in perl, and int() returns a number. Hence why they don't see anything wrong with int() returning Inf/Nan.
The perl doc for int() not even mentioning inf/nan is another example of how un-user friendly perl is, and IMO is one of the reasons why perl is dieing out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Weird behavior of int()
by choroba (Cardinal) on May 21, 2024 at 09:03 UTC | |
|
Re^4: Weird behavior of int()
by syphilis (Archbishop) on May 21, 2024 at 12:33 UTC | |
by NERDVANA (Priest) on May 21, 2024 at 20:44 UTC | |
by syphilis (Archbishop) on May 22, 2024 at 02:24 UTC | |
by NERDVANA (Priest) on May 22, 2024 at 05:14 UTC | |
by syphilis (Archbishop) on May 24, 2024 at 04:41 UTC | |
by pryrt (Abbot) on May 21, 2024 at 21:39 UTC | |
by ikegami (Patriarch) on May 21, 2024 at 23:11 UTC | |
by pryrt (Abbot) on May 21, 2024 at 23:38 UTC | |
| |
|
Re^4: Weird behavior of int()
by NERDVANA (Priest) on May 21, 2024 at 21:01 UTC |