I wonder what type of PLC you are programming, I just found that Rockwells structured text uses elsif, and Ada did, but it isnโt for the PLC, is it?
They tell me that this is syntactic sugar, there is elsif, so you do not have code cluttered with many brackets.
if cond1 then funct1 elsif cond2 then funct2 elsif cond3 then funct3 else funct4 end if
becomes
if cond1 then funct1 else (if cond2 then funct2 else (if cond3 then funct3 else funct4 )) end if
As for the origin, I guess he was just stuck with Ada or something else before that.
daniel
source share