$isnumber » History » Version 5
Per Amundsen, 02/23/2023 02:05 PM
| 1 | 1 | Per Amundsen | _Added in 4.2_ |
|---|---|---|---|
| 2 | |||
| 3 | *$isnumber(text [, cdens])* |
||
| 4 | |||
| 5 | Returns [[$true]] if the text is a number, otherwise [[$false]]. |
||
| 6 | |||
| 7 | 4 | Per Amundsen | _Same as [[$isnum]]._ |
| 8 | |||
| 9 | 1 | Per Amundsen | *Parameters* |
| 10 | |||
| 11 | 5 | Per Amundsen | table(ktable). |
| 12 | |*Parameter*|*Description*| |
||
| 13 | | c | Enables 's' and 'd', *partial TODO* | |
||
| 14 | | d | Allows decimal numbers. | |
||
| 15 | | e | Allows scientific (exponential) notations. | |
||
| 16 | | n | Allows regular numbers. | |
||
| 17 | | s | Allows leading + and minus signs. | |
||
| 18 | 1 | Per Amundsen | |
| 19 | *Example* |
||
| 20 | |||
| 21 | <pre> |
||
| 22 | ; Returns $false |
||
| 23 | //echo -ag $isnumber(abc) |
||
| 24 | |||
| 25 | ; Returns $true |
||
| 26 | //echo -ag $isnumber(555) |
||
| 27 | </pre> |