Fix example for ES.70

As per #574, fixes the example in ES.70 to emphasize good use of a switch over a sequence of if-else-if statements.
pull/1252/head
Neil MacIntosh 2018-08-12 21:55:30 -07:00 committed by GitHub
parent 42f8fa5f84
commit 184fe5397f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -12051,8 +12051,15 @@ Statements control the flow of control (except for function calls and exception
void use(int n)
{
switch (n) { // good
case 0: // ...
case 7: // ...
case 0:
// ...
break;
case 7:
// ...
break;
default:
// ...
break;
}
}