3.2.16. isdigit

Checks if a character is a digit.

Syntax:

int isdigit (c)
int c;

where:

c

The character to be checked.

Description

This macro checks if a character is a digit.

Return value

int

One of the following:

0

Character is not a digit.

>0

Character is a digit.

Example

define /R int chkDigit(myChar)
char myChar;
{
   if (isdigit(myChar) > 0)
        $printf "digit character"$;
    else
        $printf "non-digit character"$;
}
.
cexpression chkDigit('1')

See also

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0175K
Non-Confidential