Since the while "break" syntax is not fully working (see issue 174) I attempted to use GOTO and label commands instead, taking into account that it is only implemented for reverse-goto now. Unfortunately the output is unreadable, with the green goto lines being drawn on top of lots of other content (boxes, other lines, arrows)
Here's an example
@startuml
skinparam padding 10
skinparam partitionBorderThickness 4
start
partition #BUSINESS "first file" {
:start things;
partition #PaleGoldenRod "first idea" {
:<b>if</b> running in <b>mode A</b>, <b>then</b> all the <b>following code</b> is wrapped in a while loop "<b>while (command was NOT "quit")</b>";
:call startup code>
partition #Thistle "second file <b>the starting function()</b>" {
:if this is the first time being called,
it will send an email to the user;
partition #MediumSpringGreen "third file <b>loop_function()</b>" {
while (command was NOT "quit")
:open a TCP/IP socket, unless the <b>goto_label</b> flag was previously set;
label while_loop_start
:when data is received on the socket, call processing function>
partition "fourth_file.c <b>processing()</b>" {
if (command == "read")
if (perform readA SUCCEEDS) then (True)
#LawnGreen:send result to client;
:restart while loop;
goto while_loop_start
endif
:set <b>goto_label</b> variable, then return to <b>first idea</b>;
:jump back to this line (using the C "goto" syntax);
if (<bfirst idea</b> read SUCCEEDS) then (True)
#LawnGreen:send result to client;
:restart while loop;
goto while_loop_start
endif
if (last chance)
:perform last chance code;
#LawnGreen:send a 0 to client;
goto while_loop_start
endif
elseif (command == "write")
if (perform writeA SUCCEEDS) then (True)
#LawnGreen:send result to client;
:restart while loop;
goto while_loop_start
endif
:set <b>goto_label</b> variable, then return to <b>first idea</b>;
:jump back to this line (using the C "goto" syntax);
if (first idea write SUCCEEDS) then (True)
#LawnGreen:send result to client;
:restart while loop;
goto while_loop_start
endif
if (last chance)
:perform last chance code;
#LawnGreen:send a 0 to client;
goto while_loop_start
endif
elseif (command is alternate)
:other processing;
#LawnGreen:send result to client;
:restart while loop;
goto while_loop_start
endif
if (other commands) then (True)
:perform relevant processing;
endif
}
endwhile
}
}
}
}
@enduml
Since the while "break" syntax is not fully working (see issue 174) I attempted to use GOTO and label commands instead, taking into account that it is only implemented for reverse-goto now. Unfortunately the output is unreadable, with the green goto lines being drawn on top of lots of other content (boxes, other lines, arrows)
Here's an example![goto example](http://www.plantuml.com/plantuml/png/xPLDJzj048Rl_XKZSmbILAZKKm88I152QYbgmZcQs6EopNhNtO-ugEA_TsSTx7mqL2hgeHAMGFBkpBplF3D9pgr3utmf4xiGgaA39LIOvq8zmFlZZKFZX1DQNMgJavdCHRPGP2ryI99O8saZuE3oVdnpUpKUGre8OnqKGb8AFnE0GOm5Dmy2TfX0UDRoxb3IjPOvgQywVquMEM6J7D9FPcUYE3cQdO7nIh5BeI0SbZedkE2BFh-wEQaOXL92UE6pGakfQqx9Gd2y5HPgWrL5EPT1gET24aYjAqX3HlFQotHPeigXHWktNoQGVlV2fOTS8MrQ66Iiqw2iOlcpxTO2CEiaGMefqogFI5PEcqGsLdYLSNYlATuqpVL5mSWi6-Q41emJ9S6CE97rAU-lmeM3Mh0X2aAeW4eK4foEkTwIsG7_cNBXot5bGh5hGwGW3NgciybCflli0RnCgWqRw8gOysHqTtHp1rPd2t9zy4ho9gtczA2TdagSaMGLA2G-n8ALeQNGtif7iEI6RT4OsZYOHfiHPwTPpqb1ZWwPdg6Cn99oq8hrMWiCC2ZeB1XPdqGpnqrQQQ6zSVCfitcNiUKkSHSDW2WwCgUda1h2l8NIXLHa2crAuEiB6D-FHbTN7yU7uDX_Rs8yRUO077p2MiLn3UAe3Lal7Gywau9KowX5OIYoMTlpxH26lvybFq5851idGTpzPd1BD09dalfD1uQSDmgSvj3kaysXmyrottnPmGopHGXkrbuAHT3p39YBmGXI5al1FYg7Fmw7Ep1FPfiIaUh_19MRa6WTP7DKsOxBmVEshCN4BvxX7zf1EEvwURrHafQszxismj4B2nxlNxdXRnlU2JH0_pdFj-KM5b0wCWhTbkU13ipDsWy8Y_ybzltGN-vaVn_SGsDmrOdTkoCTUqEIbgZSdgOsDPwIzZJwIhfZ_iz_Jqbo7gvzANy1)