Skip to content

Missing a break in example #459

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

Merged
merged 1 commit into from
Oct 4, 2018
Merged

Missing a break in example #459

merged 1 commit into from
Oct 4, 2018

Conversation

fv3rdugo
Copy link
Contributor

@fv3rdugo fv3rdugo commented Oct 4, 2018

In the example, the default option is empty, it has a comment line, this would generate an error:

expected primary-expression before the '}' token

Normally, the default option has statements, but if it is not the case, insert a break line is a solution

switch (estat) {
    case 'A':
      // statements
      break;
    case 'M':
      // statements
      break;
      default:
      // statements
      break;  //not necessary if you have statements
  }

@robsoncouto robsoncouto merged commit 8b7c090 into arduino:master Oct 4, 2018
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

Successfully merging this pull request may close these issues.

2 participants