Hello,
It would be nice if we could have the SWITCH keyword or something that simulates that.
Today the best option is ( as far as I know )
@startuml
'!pragma useVerticalIf on
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
elseif (condition C) then (yes)
:Text 3;
elseif (condition D) then (yes)
:Text 4;
endif
@enduml
here is the diagram.
How could we get rid of the last branch and directly continue from the bottom line?
if I exchange the last "elseif" to "else" ( and I have to remove the "then (yes)") the condition is written on the line
and we lose consistency in my opinion.
the SWITCH is useful when we have an Enumeration and we know exactly the different possible values.
Hope that I am clear.
Best Regards,
Kasra