M
Mike and Jo
I've been converting some code to C++. I'm trying to use the Switch
function to compare a result. Is it possible to use switch to evaluate
'>0', '<0', 0?
Example
switch (result)
{
case (>0):
case (<0):
default:
}
I know this can be done in other languages but all the documentation I have
found in C++ show that you must evaluate const expressions (single values).
I am currently using and If - Else If - Else structure. Does anyone have an
efficient work around I can persue?
Thanx
Mike
function to compare a result. Is it possible to use switch to evaluate
'>0', '<0', 0?
Example
switch (result)
{
case (>0):
case (<0):
default:
}
I know this can be done in other languages but all the documentation I have
found in C++ show that you must evaluate const expressions (single values).
I am currently using and If - Else If - Else structure. Does anyone have an
efficient work around I can persue?
Thanx
Mike