Undefined variable

0 votes
asked Aug 1 in Question / help by gbrusella (140 points)

Given the following example:

@startuml
!function LineColor() return #7BFFBD

!function Msg($from, $to, $note = "", $active = "false")
{
    !if ((activate == "true") || (activate == "TRUE"))
        $from [LineColor()]->> $to ++
    !else
        $from [LineColor()]->> $to
    !endif

    !if ($note!="") 
        note left : $note

}
!endfunction
box
    participant "Service A" as A
    participant "Service B" as B
end box

box
    participant "Service C" as C
end box

Msg(A, B, "",true)
@enduml

http://www.plantuml.com/plantuml/png/ZP4_JyCm4CNt-nGlfaEYXXa9gLNZG2TO-3CX1XDiP2crAyUfa2ZVdRDfQHb0lS6oVJ-_UxvR3565EAvwAipekcYzmurrklMz3sM5eECO7Cukv78fh-Y8kXtUoea9VbLZ4ZqlpaUD6OJWlM9caqz6zOCM5NqGE0fhK9OvgnBDG0mZvx7TulVzmztZjQWgmYvoBJmTcNi-dyzJRKodt-AQIvt0xs3tQWqTN6N_nKombn-D_ALUcuXBv3pH9wMN-oxGYt_Fz5g5Q3kxLYv2tEkmiPr68w06D7y3CWEIM159wN-vDjFjWKuZQ6h8EZKzzR6YVImOugb-0G00

Do you know what I'm doing wrong?

1 Answer

0 votes
answered Aug 1 by plantuml (200,200 points)
commented Aug 1 by gbrusella (140 points)
Thanks. It works... but why the quote marks on a defined item? In the old preprocessor we did not require such element on the invocation.
commented Aug 2 by gbrusella (140 points)
Perfect. Thanks you,
...