!
! Care has to be taken both to detect the missing %recordformatspec,
! and to insert it in the output at the right level!
!

begin

  recordformatspec RECFM                                              ; ! <--- *should* be re-inserted here
  
  routine DO SOMETHING NESTED
                                                                        ! <--- don't want it to be reinserted here!
    recordformat LISTFM(integer val, record (RECFM) name LINK)
    
    own record (LISTFM) this
    
    print string("sizeof(this) = "); write(sizeof(this), 0); newline
    
  end
  
  recordformat RECFM(integer I, J)                                   ;  ! <--- this is what determines the scoping level where recordformatspec is re-inserted
  
  DO SOMETHING NESTED
  
endofprogram