- Jun
- 570
- 4
I have been wrestling with creating user-defined functions that use the @IF function to choose between two cases. As the help clearly points out, both the true and false cases are evaluated, so they must not generate an error. The function CLP that I showed in another post works only because the @CLIP function is amazingly tolerant of aberrant syntax and does not throw an error message for the alternative case. (Actually, I imagine that there are cases where the CLP function will not work; I just didn't come across them in my testing.)
Does anyone have a workaround for dealing with this?
The only thing I have come up with is to write a batch file, where the IF and IFF functions do not have the same issue, and to use the @EXECSTR function to call the batch file and get the result to be returned by the function.
Does anyone have a workaround for dealing with this?
The only thing I have come up with is to write a batch file, where the IF and IFF functions do not have the same issue, and to use the @EXECSTR function to call the batch file and get the result to be returned by the function.