I have an IF statement like:
if func0 or func1 of func2 then ...
and I want the functions called "in order"; but I *think* (especially with optimisation) the order of calling the functions is not assured. (Each function returns a boolean.)
I can rewrite the code, to achieve what I want, using a "fake" Loop:
for a := 0 to 0 do
begin
if func0 then break;
if func1 then break;
if func2 then break;
end;
but is "inelegant".
Is there a better way to ensure the functions are called in order!?
cheers
S.
Laz 2.2.0; FPC 3.2.2, Win 11.