[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU-COBOL] Procedure Division Format Question



>>>>> "Laura" == Laura Tweedy <ltweedy@bellatlantic.net>
>>>>> wrote the following on Fri, 16 Jul 1999 19:21:43 -0400

  Laura> Cobol Gurus!  The standard claims the following are both
  Laura> valid format for the procedure division:

  Laura> Format 1: PROCEDURE DIVISION.  { section-name SECTION.  [
  Laura> paragraph-name.  [sentence]... ]... }...

  Laura> Format 2: PROCEDURE DIVISION.  { paragraph-name.
  Laura> [sentence]... }...

  Laura> I read this as meaning that IF you're going to have
  Laura> sections, the first thing in the Procedure division MUST be
  Laura> a section line.  And, that IF the first thing you have is a
  Laura> paragraph, you can not have section definitions later.

  Laura> Is this right?  By that I mean, do most compilers enforce
  Laura> this?  Is it enforced at all?  What does the section
  Laura> definition mean here?  I can't find a description of what
  Laura> declaring sections in the procedure division gets you.

  Laura> For those of you with a standard, the above appears on page
  Laura> VI-51.

  Laura> laura -- Laura Tweedy .. ltweedy@bellatlantic.net

I'll let the language lawyers interpret the standard for you, Laura,
but I can tell you that in every COBOL compiler I worked on, we put
an invisible section header at the beginning of the procedure
division.  

Mike




--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.