I think this is closest to the OP's intent, because it also detects if the number doesn't fit into an "integer".
But I'd change the if condition tobecause for humans that's easier to parse than... if $input eq int $input;
... if int $input eq $input;
In reply to Re^2: using int and the range function
by soonix
in thread using int and the range function
by Melderon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |