Importing procedures and functions

0 votes
asked Sep 30 in Question / help by carathorys


Is there a way, to collect procedures and functions in a standalone file, and import them in other files?

I'm trying to achieve this, because I've written some functions to generate docs, collected these functions to a separated file, and imported to the ones, where I would like to use these functions.

The result is just Syntax Error ? error message.

Thanks for your help!



1 Answer

0 votes
answered Oct 1 by plantuml (232,180 points)


Here is a basic example:

File a.puml:

!procedure $msg($source, $destination)
  $source --> $destination

File b.puml:

' Import the procedure "msg"
!include a.puml

$msg("foo1", "foo2")

It should work fine.
Tell us if you find issues!