The Program has no errrors when checking with check50 but when i check vigenere.c with style50 by:
style50 2015.fall.pset2.vigenere vigenere.c
it gives the following error:
:( 84:20 Too much whitespace after "alphabet". Expected: 0, found: 1.
:( 90:20 Too much whitespace after "alphabet". Expected: 0, found: 1.
The function where this error occurs is as follows:
int key_gen(char alphabet)
{
int key;
// key for upper case letters
if (isupper(alphabet))
{
key = (int) alphabet - 'A';
}
// key for lower case letters
if (islower(alphabet))
{
key = (int) alphabet - 'a';
}
return key;
}
Note
I have already tried removing the space after alphabet
and then i get the following error:
:( 84:29 Not enough whitespace after "-". Expected: 1, found: 0.
:( 84:20 Too much whitespace after "alphabet". Expected: 0, found: 1.
:( 90:28 Not enough whitespace before "-". Expected 1, found: 0.
:( 90:28 Not enough whitespace after "-". Expected: 1, found: 0.
I want to ask, if my code is styled according to standards or not. Although the program itself passes the check50 test :)