Hi,
I want to duplicate the same component as follows:
@startuml
component [Adder] as 1
component [Adder] as 2
component [Adder] as 3
component [Adder] as 4
@enduml
Instead of writing 4 lines of code: component [Adder] as x, I try to use the procedure/while to generate four same components at once as follows.
@startuml
!procedure $foo($arg)
!while $arg!=0
component [Adder] as $arg;
!$arg = $arg - 1
!endwhile
!endprocedure
start
$foo(4)
end
@enduml
However, syntax error emerges. So are there some methods to implement this generator?