1
2
3
4
5
6
7
8
9
10
11 get_imaginary: proc(pt) returns(ptr);
12
13
14
15
16 Note
17
18
19 dcl (p,pt,q,s) ptr;
20
21 dcl get_reference entry() returns(ptr);
22
23 dcl (divide,mod) builtin;
24
25 %include reference;
26 %include boundary;
27 %include symbol;
28
29 q = get_reference();
30 p = pt;
31 if ^ p -> reference.shared
32 then p -> reference.ref_count = p -> reference.ref_count + 1;
33 q -> reference.qualifier = p;
34 q -> reference.symbol = p -> reference.symbol;
35 q -> reference.c_length = p -> reference.c_length;
36
37 s = p -> reference.symbol;
38 q -> reference.c_offset = divide(q -> reference.c_length,2,24,0);
39
40 if s -> symbol.unaligned
41 then do;
42 q -> reference.units = digit_;
43 q -> reference.c_offset = q -> reference.c_offset + mod(q -> reference.c_offset,2);
44 end;
45 else q -> reference.units = character_;
46
47 q -> reference.data_type = p -> reference.data_type;
48 q -> reference.defined_ref = "1"b;
49
50 return(q);
51
52 end;