Goto main content

isinteger

Checks for a digit (0 through 9) that may be preceed by + or -.

ISINTEGER

NAME

isinteger - Checks for a digit (0 through 9) that may be preceed by + or -.

SYNOPSIS

isinteger("…");

DESCRIPTION

This function is used to determine if the argument is a digit, that is an arabic number contained between 0 and 9 and maybe start with + or -. The argument can be a single character or a string. In the latter case, each character has to be a digit for the function to be true.

EXAMPLES


 if isinteger("10") then
        "integer";
 else
        "not integer";
 endif

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.