File: nested_if.signalling

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 (31 lines) | stat: -rw-r--r-- 668 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
defproc xxx($txt, $ent, $note="")
{
    a,$ent;
    if $txt=="hooray" then {
        a->$ent: special label is \c(red)\Q($txt).;
    } else {
        if $txt=="never" then {
            a->$ent:should never happen;
        } else {
            a->$ent: label is \Q($txt).;
        };
    };
    $ent->$$~c [label=aa];
    if $note then {
        defstyle note [text.bgcolor=red];
        note [label=$note];
    };
    if $note then note [label=$note];

};

defstyle kk [text.color=red];
a->b: h\s(kk)h\s()h;
replay xxx("h\s(kk)h\r(aa)", b);
replay xxx("c\s(kk)c", d);

hide; show a;
nudge;heading;
replay xxx("hooray", d, "yesyes");