What’s the best way to define a between macro, which is type generic (char,int,long)
which will return true if a number is between to other numbers inputted.
I’m tried to google it, but I didn’t find anything.
Edit: The order of the two boundaries given shouldn’t matter. so it can be more general.
If you do something like:
you are going to have problem with the double evaluation of
a. Think what would happens if you do that with a functions that has side effects…you should instead do something like:
(edited because the result should not depend of the order of b and c):