You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There must be an error with the function definition, I think the current implementation of the grammar allows the parsing of the malformed function definition.
If you're saying that it is valid to define a function as
voiddraw_greenSquare
{
}
then no, I don't believe that's the case (in ANSI C, which is what LearnCS! supports). The argument list parenthesis are required, and if no arguments, then the argument list must contain the keyword void.
The one I need to research is void draw_green; which doesn't make any intuitive sense (what storage size would it be?), but I'm not sure whether it's legal. (And if it's legal, what does it mean? I'm almost certain it's not legal.)
Regardless, a proper error message should be generated, not an internal error.
This program generates an internal error. Note void global variable and incorrect syntax for draw_greenSquare function definition.
The text was updated successfully, but these errors were encountered: