4 ms·
Hey, I like any language with this kind of goto: http://www.c3-lang.org/statements/#nextcase-and-labelled-nextcase http://www.c3-lang.org/statements/#nextcase-
by msla 4y ago
Hey, I like any language with this kind of goto:
http://www.c3-lang.org/statements/#nextcase-and-labelled-nextcase http://www.c3-lang.org/statements/#nextcase-and-labelled-nex...
> It's also possible to use nextcase with an expression, to jump to an arbitrary case:
switch (i)
{
case 1:
doSomething();
nextcase 3; // Jump to case 3
case 2:
doSomethingElse();
case 3:
nextcase rand(); // Jump to random case
default:
libc::printf("Ended\n");
}
> Which can be used as structured goto when creating state machines.