!
! pass1 doesn't pass the recordformatspec through, and although we can detect when
! 'recfm' is used before it has been fully specified, we can't know the original
! location where it was declared. We have to take care when reinserting a generated
! recordformatspec to place it where it applies to all necessary uses.
!
begin
recordformatspec recfm { recordformat spec has to be inserted here }
integer i = 42 { or here. NOT in nest1 because then it would }
integermap nest1 { already be out of scope again before the }
integer filler = 17 { decaration of 'another' }
ownrecord (recfm) name fred
result == INTEGER(ADDR(fred))
end
record (recfm) name another
recordformat recfm(integer q)
nest1 = 42
write(nest1, 0)
newline
endofprogram