isdigit Method

Purpose:

Checks a string for characters outsize the range  0-9

Syntax:

isdigit(string)

Comments: 

Returns zero if string is valid. Returns -1 if invalid.

Example:

 

p isdigit("123")

0

p isalpha("123a")

-1  // fails because of the a in the string