Procedure with variadic arguments?

0 votes
asked Feb 24, 2023 in Question / help by Douglas Pagani
It's been tough to google for this question, but I spent around a hour so I feel like that was enough good faith effort.

If I try to call a procedure with a varying number of args, it doesn't map the procedure. It seems like the signatures for the procedures are matched to exact arity.

2 Answers

0 votes
answered Feb 24, 2023 by Todd Musheno (2,680 points)
Context please
0 votes
answered Feb 24, 2023 by The-Lu (64,340 points)

Hello D., and all,

For that you can use 'Default argument value', as:

@startuml
!procedure f(n, a, b, c="<b><color:green>opt")
card n [
a
b
c
]
!end procedure

f(n1, a, b, c)

f(n2, a, b)

@enduml

See also doc here:

Regards.

...