summaryrefslogtreecommitdiff
path: root/exercises/108_labeled_switch.zig
AgeCommit message (Collapse)Author
2026-04-03Insert space for additional async exercisesChris Boesch
2025-06-01108: .felixrabe
2025-06-01108: Make prettyfelixrabe
2025-03-20fix: typosJost Alemann
2025-01-08Update exercises/108_labeled_switch.zigchrboesch
Fixed an error in the debug statement and made the text a bit more coherent. Signed-off-by: chrboesch <chrboesch@noreply.codeberg.org>
2025-01-08Update exercises/108_labeled_switch.zigchrboesch
The sentence was slightly unclear Signed-off-by: chrboesch <chrboesch@noreply.codeberg.org>
2025-01-07Fix a typo: we need do we need to -> we need tomikkurogue
Morning delirium does not help when looking at lots of words
2025-01-07Update: Remove the 4th branch in favour of just making that the else branchmikkurogue
Probably easier to not have an "unused" branch that returns the same as the else branch in the example. Signed-off-by: mikkurogue <mikkurogue@noreply.codeberg.org>
2025-01-04Update: 108 Labeled switch example to contain default case for exhaustionmikkurogue
Update example text to give clarity on default/exhaustive case. Reasoning: The input for the example will not compile if user would want to test this for the logic of a labeled switch. Due the input not being an exhaustive input but rather "any u8 integer" (for the lack of better terminology) we need to use the else branch to indicate that the default case is handled, in this case by just emulating the '4' branch, but this could return an error.InvalidCaseProvided for example. Signed-off-by: mikkurogue <michael.lindemans@outlook.com>
2024-09-20Minor improvements.Chris Boesch
2024-09-18improve explanantions in labeled switchNuno Mendes
2024-09-16update labeled switch to also have a break statementNuno Mendes
2024-09-15108: Add a exercise for a labeled switchNuno Mendes