We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab4be25 + 9b5b51d commit 7730dc5Copy full SHA for 7730dc5
chapter_4/exercise_4_06/variables.c
@@ -244,7 +244,7 @@ int getop(char s[])
244
245
s[1] = '\0';
246
247
- if (isalpha(c) && !(c >= 'A' && c <= 'Z'))
+ if (islower(c))
248
{
249
var = c;
250
return VARGET;
@@ -296,7 +296,3 @@ int getop(char s[])
296
297
return NUMBER;
298
}
299
-/* To prevent the variable checking in getop() from overlapping with the letter commands,
300
-make sure you set the commands to capital letters and explicitly tell the getop() to only
301
-check for variable-getting if the character is not capital
302
-e.g insteat of "if (isalpha(c))" you add "if (isalpha(c) && !(c >= 'A' && c >= 'Z'))"*/
0 commit comments