og.pr 1.87 KB
Newer Older
1
SYSTEM og;
2
    /* CIF TEXT (159, 221), (289, 188) */
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    -- Text area for declarations and comments

use dv comment 'dataview.asn';

signal dd;
signal we;
    /* CIF ENDTEXT */
    CHANNEL c
        FROM ENV TO og WITH dd;
        FROM og TO ENV WITH we;
    ENDCHANNEL;
    BLOCK og;
        SIGNALROUTE r
            FROM ENV TO og WITH dd;
            FROM og TO ENV WITH we;
        CONNECT c AND r;
        /* CIF PROCESS (225, 49), (150, 75) */
        PROCESS og;
21
            /* CIF TEXT (79, 58), (337, 130) */
22
23
24
25
            --  Test support for empty sequences and NULL type

dcl empty1 EmptySeq := c1;

26
dcl null1 NullType;
27

28
dcl choice1 ChoiceWithEmptySeq := a: n1;
29
            /* CIF ENDTEXT */
30
            /* CIF START (182, 226), (70, 35) */
31
            START;
32
                /* CIF TASK (160, 276), (115, 35) */
33
                TASK empty1 := c1
34
                /* CIF COMMENT (294, 276), (139, 35) */
35
                COMMENT 'Using a constant';
36
                /* CIF TASK (161, 326), (112, 35) */
37
                TASK empty1 := {}
38
                /* CIF COMMENT (292, 326), (135, 35) */
39
                COMMENT 'Classic notation';
40
                /* CIF TASK (152, 376), (130, 35) */
41
                TASK choice1 := b: c1;
42
                /* CIF TASK (154, 426), (126, 35) */
43
                TASK choice1 := b: {};
44
                /* CIF TASK (167, 476), (100, 35) */
45
                TASK null1 := n1;
46
                /* CIF NEXTSTATE (182, 526), (70, 35) */
47
                NEXTSTATE wait;
48
            /* CIF STATE (446, 231), (70, 35) */
49
            STATE wait;
50
                /* CIF INPUT (439, 286), (84, 35) */
51
                INPUT dd;
52
                    /* CIF OUTPUT (437, 336), (89, 35) */
53
                    OUTPUT we;
54
                    /* CIF NEXTSTATE (446, 386), (70, 35) */
55
56
57
58
59
                    NEXTSTATE wait;
            ENDSTATE;
        ENDPROCESS og;
    ENDBLOCK;
ENDSYSTEM;