Commit Graph

12 Commits

Author SHA1 Message Date
felixrabe b1223f92ed 108: . 2025-06-01 01:08:07 +02:00
felixrabe 91f1c045bc 108: Make pretty 2025-06-01 01:05:37 +02:00
Jost Alemann 522b4673a4 fix: typos 2025-03-20 21:24:40 +01:00
chrboesch 90d05995b5 Update exercises/108_labeled_switch.zig
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-08 13:22:29 +00:00
chrboesch 54f743ba43 Update exercises/108_labeled_switch.zig
The sentence was slightly unclear

Signed-off-by: chrboesch <chrboesch@noreply.codeberg.org>
2025-01-08 12:18:25 +00:00
mikkurogue 87b258d0a9 Fix a typo: we need do we need to -> we need to
Morning delirium does not help when looking at lots of words
2025-01-07 18:00:16 +00:00
mikkurogue 5cdaee7420 Update: Remove the 4th branch in favour of just making that the else branch
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-07 10:15:59 +00:00
mikkurogue de353bcb3b Update: 108 Labeled switch example to contain default case for exhaustion
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>
2025-01-04 11:56:25 +00:00
Chris Boesch d1b49f353e
Minor improvements. 2024-09-20 12:10:55 +02:00
Nuno Mendes ed1a20d51b improve explanantions in labeled switch 2024-09-18 23:26:33 +02:00
Nuno Mendes db569a1478 update labeled switch to also have a break statement 2024-09-16 18:39:54 +02:00
Nuno Mendes 335a78f8f5 108: Add a exercise for a labeled switch 2024-09-15 20:14:49 +02:00