3 ms·
I've done something similar in my form-validation library. I have a function that has three inputs that basically end up behaving like flags. So there are 8 pos
by vivin 13y ago
I've done something similar in my form-validation library. I have a function that has three inputs that basically end up behaving like flags. So there are 8 possibilities in total. I ended up creating a function that would return a three-bit binary number based on the inputs, and I also created a jump-table that maps the three-bit binary values to specific handlers.