Hi B, and all,
It is not yet possible, because the preproc. turns only one time, and directly interprets the !startsub command
See:
But a tricky workaround is to use first the prepoc to create the source file and then run plantuml, with this code:
@startuml mainfile
!procedure $example($name)
%newline()!startsub %upper($name)
state $name
%newline()!endsub
!endprocedure
$example(foo)
$example(bar)
@enduml
[You can also use `%chr`, or `%string`, ...]
Then run:
java -jar plantuml.jar -preproc code.puml
We obtain:
@startuml mainfile
!startsub FOO
state foo
!endsub
!startsub BAR
state bar
!endsub
@enduml
Then run:
java -jar plantuml.jar mainfile.preproc
Enjoy,
Regards,
Th.