|
James Rich wrote: > ... > But then it gets weird. I added a little procedure at the bottom of > this program (after all the O specs, which is where procedures should > go, right? I've done this before, so that's one reason I'm surprised at > what happened next). The procedure I added appears before the > compile-time arrays (remember, this is old-school code here). The > procedure I added does not reference the record format in question, nor > does it reference the field WOSTAT. But now the compile fails! Now the > record format is copied into the program (even though it still isn't > referenced). Does putting a procedure body at the bottom of a program > change the way the compiler includes/ignores externally defined > fields/formats? I admit that I need to change the screen specs, but why > did the behaviour of the compiler change when I coded the procedure? > James, the compiler doesn't generate the O specs unless the output record was referenced. But since the O specs are generated before the compiler starts looking at the procedures, as soon as the compiler sees a P spec, it generates the O specs for all the possible output records, in case the record might be referenced by a procedure.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.