User manual

mikroPascal PRO for PIC32
MikroElektronika
569
Button
Example
while TRUE do
begin
if (Button(PORTD, 0, 1, 1)) then // detect logical
one on RB0 pin
oldstate := 1;
if (oldstate and Button(PORTD, 0, 1, 0)) then
begin // detect one-
to-zero transition on RB0 pin
LATB := not LATB;
oldstate := 0;
end;
end; // endless loop
end.
Notes None.
C Type Library
The mikroPascal PRO for PIC32 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
function isalnum(character : byte) : word
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