----- Original Message -----
From: "~Rick" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, August 07, 2008 2:05 PM
Subject: Re: [c-prog] isalpha
> Bill,
>
> isalpha() only checks a single character. You will need to iterate
> over the argv[1] string (character array) to check the entire value.
>
> Something like:
>
> int isALPHA = 1; // set initially to TRUE
>
> for (int ix = 0, ix < strlen(argv[1]); ++ix)
> {
> if (!isalpha(argv[1][ix])
> {
> isALPHA = 0; // Set to FALSE
> break;
> }
> }
>
> if (isALPHA)
> {
> ...
> }
>
> ~Rick
I see. The reference I looked at says that the first and only parameter
isalpha takes is int. How would you check for a char string if isalpha takes
an int?
Bill