Can multiline parameters be sent to procedure

0 votes
asked Mar 28, 2025 in Question / help by anonymous

I'd like to be able to send multiline parameter to a procedure.

Let's say I have a procedure called foo which take a string argument. I'd like my user to be able to do something like :

foo

 Very long

mulitline

parameter

end foo

1 Answer

0 votes
answered Mar 28, 2025 by The-Lu (86,940 points)

Hello A.,

Awaiting new newline management..

For that you can use %newline or %n builtin function, as:

@startuml

!unquoted procedure $foo(s)
file f [
s
]
!endprocedure

$foo(a%newline()b%n()\
Very long%newline()\
mulitline\
%n()\
parameter)

@enduml

Seea also:

Enjoy,
Regards,
Th.

commented Mar 28, 2025 by anonymous
Ok that works though I had to use a quoted procedure and an equaliy quoted parameter.

I fill beeing able to invoke procedure as we open/close title or notes would be a great plus.
...