More than 2 choices for IF?

0 votes
asked Feb 21, 2013 in Wanted features by anonymous

Is it possible to make an If with more than 2 answers? With pure graphviz this works.

The syntax could be easyly extended:

if (Many options!) then (1st option)

    :this happens;

else (2nd option)

    :that happens;

else (3rd option)

    :another thing happens;

...

endif

1 Answer

0 votes
answered Feb 21, 2013 by plantuml (294,960 points)

Hello,

Today, you can do:

:foo1;
if (test1) then
  :foo2;
else
  if (test3) then
    :foo3;
  else
    :foo4;
  endif
endif

 

But I think we will add an "elseif" keyword to allow this:

:foo1;
if (test1) then
  :foo2;
else if (test3) then
  :foo3;
else
  :foo4;
endif

The drawing will be the same.

...