[Oberon] Oberon-7 - IF ELSE optimisation

Tomas Kral thomas.kral at email.cz
Fri Mar 8 15:25:18 CET 2019


Hi,

Trying to make this more effective,

IF (x >= 0) & (y >= 0) THEN
ELSIF (x < 0) & (y >= 0) THEN
ELSIF (x >= 0) & (y < 0) THEN
ELSIF (x < 0) & (y < 0) THEN
END ;

Recoded to below, correct?
Above has better readability.  

IF x >= 0 THEN IF y >=0 ELSE (*y < 0*) THEN END
ELSIF (*x < 0*) y >= 0 THEN ELSE (*y < 0*)
END ;

Compiler seems optimising loose ELSE IF to ELSIF?

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list