Tuesday, 7 May 2024

PlantUML: Boolean built in functions

Following Boolean built in functions are supported in PlantUML.

 

a.   %false()

b.   %true()

c.    %not(<exp>)

 

booleanBuiltInFunctions.txt

@startuml

!$studentMarks = 25

!if (%false())
Server -> Client : message1 will not be traansferred
!else
Server -> Client : message2 will be traansferred
!endif

!if (%true())
Server -> Client : message3 will be traansferred
!else
Server -> Client : message4 will not be traansferred
!endif

!if (%not(10 > 5))
Server -> Client : message5 will not be traansferred
!else
Server -> Client : message6 will be traansferred
!endif

@enduml

 

Above snippet generate below message.

 


  

Previous                                                    Next                                                    Home

No comments:

Post a Comment