1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 get_variable: proc(pt) returns(ptr);
19
20 dcl pt ptr;
21
22 dcl (p,cb) ptr,
23 null builtin,
24 create_symbol entry(ptr,ptr,bit(3) aligned) returns(ptr);
25
26 dcl max_string_len_p init(24) fixed bin int static;
27
28 %include block;
29 %include symbol;
30 %include reference;
31 %include data_types;
32 %include declare_type;
33
34 cb = pt;
35 p = create_symbol(cb,null,(by_compiler));
36 p -> symbol.c_word_size = 1;
37 p -> symbol.c_dcl_size = max_string_len_p;
38
39 p -> symbol.allocate,
40 p -> symbol.fixed,
41 p -> symbol.binary,
42 p -> symbol.real,
43 p -> symbol.auto = "1"b;
44
45 p -> symbol.location = cb -> block.last_auto_loc;
46 p -> symbol.allocated = "1"b;
47
48 cb -> block.last_auto_loc = cb -> block.last_auto_loc + 1;
49
50 p = p -> symbol.reference;
51
52 p -> reference.data_type = real_fix_bin_1;
53 p -> reference.aligned_ref,
54 p -> reference.aligned_for_store_ref,
55 p -> reference.allocate,
56 p -> reference.allocated = "1"b;
57
58 return(p);
59 end;