1 | module NC_templates_constants_signatures_enumeratedValues {
|
---|
2 | //template definitions, with and without matching symbols, good and bad
|
---|
3 | template TypeA m_templateB := {
|
---|
4 | field1 := ?,
|
---|
5 | field2 := "a",
|
---|
6 | field3 := true
|
---|
7 | }
|
---|
8 |
|
---|
9 | template TypeA mw_templateC := {
|
---|
10 | field1 := 1,
|
---|
11 | field2 := pattern "a",
|
---|
12 | field3 := true
|
---|
13 | }
|
---|
14 |
|
---|
15 | template TypeA m_templateA := {
|
---|
16 | field1 := 1,
|
---|
17 | field2 := "a",
|
---|
18 | field3 := true
|
---|
19 | }
|
---|
20 |
|
---|
21 | //derived templates
|
---|
22 | template (value) TypeA md_templateAd modifies m_templateA := {
|
---|
23 | field1 := 2
|
---|
24 | }
|
---|
25 |
|
---|
26 | template TypeA mdw_templateCd modifies m_templateC := {
|
---|
27 | field2 := pattern "a",
|
---|
28 | field3 := true
|
---|
29 | }
|
---|
30 |
|
---|
31 |
|
---|
32 | template TypeB m_templateBA := {
|
---|
33 | field1 := 1,
|
---|
34 | field2 := "a",
|
---|
35 | field3 := true,
|
---|
36 | //field4 := m_templateA
|
---|
37 | field4 := {
|
---|
38 | field1 := 1,
|
---|
39 | field2 := "a",
|
---|
40 | field3 := true
|
---|
41 | }
|
---|
42 | }
|
---|
43 |
|
---|
44 | template integer m_i1 := (1, 2);
|
---|
45 |
|
---|
46 | template integer m_i2 := ?;
|
---|
47 |
|
---|
48 | template GrantMngtSubHeader m_grantMngtUgsSi0 := {
|
---|
49 | schSvcUgs := {
|
---|
50 | si := '0'B ,
|
---|
51 | pm := ? ,
|
---|
52 | reserved14 := c_14ZeroBits
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 |
|
---|
57 | //enumerated values, good and bad,
|
---|
58 | //also data types, good and bad
|
---|
59 | type enumerated Enum {
|
---|
60 | e_a, e_b, e_c
|
---|
61 | }
|
---|
62 |
|
---|
63 | type enumerated enum {
|
---|
64 | a, b, c
|
---|
65 | }
|
---|
66 |
|
---|
67 | //signatures, goot and bad
|
---|
68 | //also formal parameters, good and bad
|
---|
69 | signature s_lookup1(in charstring p_key) return charstring exception (e_NotFound);
|
---|
70 |
|
---|
71 | signature sx_lookup1(in charstring key) return charstring exception (e_NotFound);
|
---|
72 |
|
---|
73 | //constants and external constants, good and bad
|
---|
74 | const integer c_a1 := 2;
|
---|
75 |
|
---|
76 | const integer c_1 := 2 , c_2 :=3;
|
---|
77 |
|
---|
78 | external const integer cx_a0;
|
---|
79 | external const integer ecx_a0, cx_1;
|
---|
80 |
|
---|
81 | function f_00(){
|
---|
82 | const type_00 const_00 := 1;
|
---|
83 | }
|
---|
84 |
|
---|
85 | altstep a_00(){
|
---|
86 | const type_00 const_00 := 1;
|
---|
87 | }
|
---|
88 |
|
---|
89 | testcase ts_00() runs on component_00 {
|
---|
90 | const type_00 cl_onst_00 := 1;
|
---|
91 | }
|
---|
92 |
|
---|
93 | const integer cl_a1 := 2;
|
---|
94 |
|
---|
95 | control{
|
---|
96 | const type_00 cl_onst_00 := 1;
|
---|
97 | }
|
---|
98 |
|
---|
99 |
|
---|
100 | } |
---|