Laszlo wrote:
Another possibility is to leave ErrorLevel alone, but introduce another built in variable: ArithmeticError. It is set to 0 at start of a thread, but it is set and stays set at an error. This way the user can trust the result of a series of calculations if ArithmeticError is still 0 at the end. Otherwise s/he can reset it to 0 and do corrective actions.
I agree that it's best to leave ErrorLevel alone, mainly because changing it would break existing scripts that rely on the fact that most expressions don't change ErrorLevel.
Your idea for implementation seems good. I've added it to the to-do list.
Thanks.