4 ms·
Seems like the 'classic' C way to go about it would be to use scanf/printf-style format strings: int mode = select("<%i | >%i", channel1, 42, channel2, &i)
by kayamon 11y ago
Seems like the 'classic' C way to go about it would be to use scanf/printf-style format strings:
int mode = select("<%i | >%i", channel1, 42, channel2, &i);
switch(mode) {
case 0: foo(); break;
case 1: bar(i); break;
}