Extending the case presented in #10, it would be nice to have the possibility to test for a range in a switch statement.
In my case I have a uint16 with a meaning similar to an EtherType or an IP protocol number. The difference is that there are ranges of values with a similar meaning. For example, if this uint16 has a value from 0xFEFC to 0xFEFF, I want to call one particular unit for further processing, regardless of the exact value.
A syntax for defining the range had to be invented, one could chose two dots .. like in the definition of ranges in bitfields. This should not be restricted to enum labels but could work with all types for which > and < are defined.
Extending the case presented in #10, it would be nice to have the possibility to test for a range in a switch statement.
In my case I have a uint16 with a meaning similar to an EtherType or an IP protocol number. The difference is that there are ranges of values with a similar meaning. For example, if this uint16 has a value from 0xFEFC to 0xFEFF, I want to call one particular unit for further processing, regardless of the exact value.
A syntax for defining the range had to be invented, one could chose two dots
..
like in the definition of ranges in bitfields. This should not be restricted to enum labels but could work with all types for which>
and<
are defined.