Comment on I wish
Skyline969@lemmy.ca 11 months ago
Wow. Amateur hour over here. There’s a much easier way to write this.
A case select:
select(number){ case 1: return false; break; case 2: return true; break; }
And so on.
Comment on I wish
Skyline969@lemmy.ca 11 months ago
Wow. Amateur hour over here. There’s a much easier way to write this.
A case select:
select(number){ case 1: return false; break; case 2: return true; break; }
And so on.
robotica@lemmy.world 11 months ago
Don’t forget that you can have fall-through cases, so you can simplify it even further:
UNWILLING_PARTICIPANT@sh.itjust.works 11 months ago
Teach me