1 /* subroutine to determine if a declaration can be string overlayed.  */
 2 
 3 string_overlay: proc(s) returns(bit(1) aligned);
 4 
 5 dcl       (s,p) ptr;
 6 
 7           if ^s->symbol.packed then go to fail;
 8           if s->symbol.structure
 9                     then do;
10                               p = s->symbol.son;
11                               do while(p^=null);
12                               if ^string_overlay(p) then go to fail;
13                               p = p->symbol.brother;
14                               end;
15                               return("1"b);
16                          end;
17           if ^(s->symbol.bit|s->symbol.char|s->symbol.picture)
18                     then go to fail;
19           if t = 0 then if s->symbol.bit then t = bit_;
20                                          else t = character_;
21                     else if s->symbol.bit
22                               then if t = character_ then go to fail;
23                                             else;
24                               else if t = bit_ then go to fail;
25           return("1"b);
26 
27 fail:
28           return("0"b);
29           end string_overlay;