For Programmers: Free Programming Magazines  


Home > Archive > Cobol > December 2006 > DECLARATIVES and section/paragraph









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DECLARATIVES and section/paragraph
Roger While

2006-12-19, 3:55 am

Is the following legal ? I thought it was not but
now I am not so sure. (Section 14.3 2002)

DECLARATIVES.
MYSECTION SECTION.
USE ....
END DECLARATIVES.
MYPARAGRAPH.

Roger


Thomas

2006-12-19, 7:55 am


Roger While schrieb:

> Is the following legal ? I thought it was not but
> now I am not so sure. (Section 14.3 2002)
>
> DECLARATIVES.
> MYSECTION SECTION.
> USE ....
> END DECLARATIVES.
> MYPARAGRAPH.
>
> Roger



Hi,

I think its legal, but perhaps you better use instead of MYPARAGRAPH a
section:
> END DECLARATIVES.
> MYSECTION SECTION.


Thomas

Rick Smith

2006-12-19, 7:55 am


"Roger While" <simrw@sim-basis.de> wrote in message
news:em8ajd$9fa$01$1@news.t-online.com...
> Is the following legal ? I thought it was not but
> now I am not so sure. (Section 14.3 2002)
>
> DECLARATIVES.
> MYSECTION SECTION.
> USE ....
> END DECLARATIVES.
> MYPARAGRAPH.


Conforming? Not as I understand it. See 14.1.1, General
format, Format 1 (with-sections). Declaratives may appear
only in a procedure division structure with sections. I find
nothing in 14.3 to conflict with the general format, which
shows a section header following the declaratives.



William M. Klein

2006-12-19, 6:55 pm

I know that there have been discussions about allowing this as conforming, but
neither the '02 or draft of the next Standard allow for paragraphs without
sections following the END DECLARATIVE marker.

You MAY place *all) of the non-declarative code in a single "never referenced"
section, but it does still need to be in a SECTION to be conforming.

--
Bill Klein
wmklein <at> ix.netcom.com
"Roger While" <simrw@sim-basis.de> wrote in message
news:em8ajd$9fa$01$1@news.t-online.com...
> Is the following legal ? I thought it was not but
> now I am not so sure. (Section 14.3 2002)
>
> DECLARATIVES.
> MYSECTION SECTION.
> USE ....
> END DECLARATIVES.
> MYPARAGRAPH.
>
> Roger
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com