Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

while without body #444

Closed
Konstantin8105 opened this issue Dec 11, 2017 · 1 comment
Closed

while without body #444

Konstantin8105 opened this issue Dec 11, 2017 · 1 comment

Comments

@Konstantin8105
Copy link
Contributor

/*
 * Flushes the standard input stream to "clean" unused input
 * Source: http://stackoverflow.com/a/27281028/3991578
 */
void flushStdIn() {
  int ch;
  while(((ch = getchar()) !='\n') && (ch != EOF));
}

Go:

func flushStdIn() {
        var ch int
        for {
                break
        }
// Error (WhileStmt): 345: Stmts inside Block cannot be nil
}
@Konstantin8105 Konstantin8105 changed the title add tests for problem identification while without body Dec 11, 2017
@Konstantin8105
Copy link
Contributor Author

Found in #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant