diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2017-08-17 21:53:14 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2017-08-17 21:53:14 +0200 |
commit | 76871d921fa7630b3bce5abc935d29ddac2ea541 (patch) | |
tree | a51c248df0aea7c00e10b21a3e0e92daf4439eaf /docs | |
parent | 034bd52ef08422270ddcd39dead0b6e41dce7c54 (diff) | |
download | lrl-76871d921fa7630b3bce5abc935d29ddac2ea541.tar.gz lrl-76871d921fa7630b3bce5abc935d29ddac2ea541.tar.bz2 lrl-76871d921fa7630b3bce5abc935d29ddac2ea541.zip |
C backend: Implement non-scalar switch statement
Diffstat (limited to 'docs')
-rw-r--r-- | docs/language_manual/statements.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/language_manual/statements.md b/docs/language_manual/statements.md index 7af1fcd..c65f4f7 100644 --- a/docs/language_manual/statements.md +++ b/docs/language_manual/statements.md @@ -326,12 +326,11 @@ Syntax: default defaultstatement } -**TODO** implement non-scalar switch - Evaluates the expression once and then compares it with the case values. -The case values must be compile-time constants. When a matching case value -is found, the following statement is executed. If no matching case value is -found then the default statement is executed. +The expression can have any type, including array or struct type, but the case +values must be compile-time constants. When a matching case value is found, +the following statement is executed. If no matching case value is found then +the default statement is executed. When the end of a case statement is reached, then the switch statement is exited. |