Replies: 1 comment 5 replies
-
The corresponding C3 code: char x = 10;
switch (x)
{
case -1..1: x = -x;
case 10: case 100: x = x / 10;
}
assert(x == 1) Is there any advantage to the Zig code, which is longer and more verbose? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
i wanted to ask if an modern way of writing Switch Statement like in zig would be a great idea for c3c
ZIg Style switch:
Beta Was this translation helpful? Give feedback.
All reactions