Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
657
C Type Library
The  mikroBasic  PRO  for  dsPIC30/33  and  PIC24  provides  a  set  of  library  functions  for  testing  and  mapping 
characters.
Library Functions
 
- isalnum 
 
- isalpha 
 
- iscntrl 
 
- isdigit 
 
- isgraph 
 
- islower 
 
- ispunct 
 
- isspace 
 
- isupper 
 
- isxdigit 
 
- toupper 
 
- tolower 
isalnum
Prototype
sub function isalnum(dim character as byte) as byte
Description Function returns 0xFF if the 
character
 is alphanumeric (A-Z, a-z, 0-9), otherwise returns zero.
Example
res = isalnum(“o”)   ‘ returns 0xFF
res = isalnum(“\r”)  ‘ returns 0
isalpha
Prototype
sub function isalpha(dim character as byte) as word
Description Function returns 0xFF if the 
character
 is alphabetic (A-Z, a-z), otherwise returns zero.
Example
res = isalpha(“A”)  ‘ returns 0xFF
res = isalpha(“1”)  ‘ returns 0
iscntrl
Prototype
sub function iscntrl(dim character as byte) as word
Description Function  returns  0xFF  if  the 
character
  is  a  control  or  delete  character(decimal  0-31  and  127), 
otherwise returns zero.
Example
res = iscntrl(“\r”)  ‘ returns 0xFF
res = iscntrl(“o”)   ‘ returns 0