3 ms·
If you want to, you can handle that in the switch statement: case 'x': if(x_set) { fprintf(stderr, “can’t set x twice”); err = 1;
by Someone 9y ago
If you want to, you can handle that in the switch statement:
case 'x':
if(x_set) {
fprintf(stderr, “can’t set x twice”);
err = 1;
} else {
x_set = true;
}
break;
If your machine has 64kB of memory or thereabouts, you may choose to not bother, though.