10-17-2022, 07:34 PM
(10-17-2022, 06:41 AM)Pete Wrote: I agree that a good compiler could optimize the IF/THEN statements, but I would get a bit concerned at what point relationship comparisons are allowed. Two elements, as my y and x example, are not too difficult but what if someone wanted u, v, x, y, z all in one CASE relationship? That gets to be a hell of a lot of nesting.
Well it depends, but really the compiler should be able to group the comparisons such that it only does them once and then uses the results to check the various combinations for each
CASE. Presumably a lot of the
CASEs will share the same individual comparisons, so the compiler would simply work out which comparisons are needed by which cases and then do them in the proper order.