File: exBB.graph

package info (click to toggle)
msc-generator 8.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180,484 kB
  • sloc: cpp: 129,931; yacc: 23,655; ansic: 7,464; sh: 5,026; makefile: 948
file content (17 lines) | stat: -rw-r--r-- 729 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
##Procedures
##procedure concatenate
##You can define procedures the same way as in other Msc-generator languages with input parameters (and optional defaults). Use the '~' symbol to concatenate text and variable content and the '\Q()' text escape to insert the value of a variable into a label.

defproc addgroup($group_name, $target, $color=black) {
    edge [color=$color];
    A_~$group_name->$target:: \c($color) 1st\n(\Q($group_name));
    B_~$group_name->$target:: \c($color) 2nd\n(\Q($group_name));
    C_~$group_name->$target:: \c($color) 3rd\n(\Q($group_name));
}

graph {
    composite;
    replay addgroup(iron, composite);
    replay addgroup(steel, composite, blue);
    replay addgroup(gold, composite, yellow);
};