SW006014 Microchip Technology, SW006014 Datasheet - Page 20

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

Specifications of SW006014

Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
DS51456E-page 16
isdigit
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
isgraph
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
Test for a decimal digit.
<ctype.h>
int isdigit(int c);
c
Returns a non-zero integer value if the character is a digit; otherwise,
returns zero.
A character is considered to be a digit character if it is in the range of
‘0’- ‘9’.
#include <ctype.h> /* for isdigit */
#include <stdio.h> /* for printf */
int main(void)
{
}
Output:
3 is a digit
# is NOT a digit
Test for a graphical character.
<ctype.h>
int isgraph (int c);
c
Returns a non-zero integer value if the character is a graphical charac-
ter; otherwise, returns zero.
A character is considered to be a graphical character if it is any print-
able character except a space.
#include <ctype.h> /* for isgraph */
#include <stdio.h> /* for printf */
int main(void)
{
int ch;
ch = '3';
if (isdigit(ch))
else
ch = '#';
if (isdigit(ch))
else
int ch;
printf("3 is a digit\n");
printf("3 is NOT a digit\n");
printf("# is a digit\n");
printf("# is NOT a digit\n");
character to test.
character to test
© 2008 Microchip Technology Inc.

Related parts for SW006014