plantuml样式_PlantUML之活动图

基本语法

每个普通节点:冒号开头,分号结尾

活动图的起始和结尾:start、end或stop

start

:case1;

:case2;

end

757a199dd013f6b19de1f21044241130.png

条件语句

start

if(predicate?) then (yes)

:case yes;

else (no)

:case no;

endif

end

719be8bf637132f381abdd87d4cec2c1.png

多重条件语句

plaintUML里没有switch语法,只能使用elseif代替

start

note right:多分支条件语句,实现switch

if (condition A) then (yes)

:Text 1;

elseif (condition B) then (yes)

:Text 2;

stop

elseif (condition C) then (yes)

:Text 3;

elseif (condition D) then (yes)

:Text 4;

else (nothing)

:Text else;

endif

stop

4e6f969f994046e7ad79641168e81f7f.png

do while循环

start

note right:do while循环

repeat

:read data;

:generate diagrams;<

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值