Replies: 1 comment
-
Hi, technically it is an issue but the situation is strange, the example you showed is missing the select statements for the case, meaning the code will always go into the else block making the case irrelevant. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i am trying to compile function which has switch case, but it contails only else block.
when trying to build program, getting compile error.
Sample code is as below:
funcSwitchCaseTest.ST:
Getting following compile errors as,
error: Unexpected token: expected Literal but found else
┌─ funcSwitchCaseTest.ST:10:5
│
10 │ else
│ ^^^^ Unexpected token: expected Literal but found else
error: Unexpected token: expected KeywordSemicolon but found 'else
retVar := FALSE'
┌─ funcSwitchCaseTest.ST:10:5
│
10 │ ╭ else
11 │ │ retVar := FALSE;
│ ╰───────────────────────^ Unexpected token: expected KeywordSemicolon but found 'else
retVar := FALSE'
error: Unexpected token: expected Literal but found end_case
┌─ funcSwitchCaseTest.ST:12:5
│
12 │ end_case;
│ ^^^^^^^^ Unexpected token: expected Literal but found end_case
error: Unexpected token: expected KeywordSemicolon but found 'end_case'
┌─ funcSwitchCaseTest.ST:12:5
│
12 │ end_case;
│ ^^^^^^^^ Unexpected token: expected KeywordSemicolon but found 'end_case'
Is this issue with rusty compiler?
Beta Was this translation helpful? Give feedback.
All reactions