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

Re: gnubol: Braiding #1 #2 #3



Bill,

1. Cen you quote where it says search can have nested conditionals - I
have
'searched' in vain (I found it for IF OK) both in the standard and the
two
updates even CD1.7. I don't have the clarifications with me, and my wife
has
already read too many of them out to me over the phone.

2. I agree with your interpretation of the standard. However given the
MF
extension, would you object to allowing nested conditionals provided
that any
extension is flagged, and that standard conforming code works as per the
standard. Obviously you have the data and also feel strongly about this
:-)

FYI here is the paragraph that to me says the "[on] size error" binds to
the immediately preceding arithmetic (unless the immediately preceding
arithmetic already has that "[not] [on] size error}"

"When statements are nested within other statements which allow optional
conditional phrases, any optional conditional phrase encountered is
considered
to be the next phrase of the nearest preceding unterminated statement
with which
that phrase is permitted to be associated 

*** according to the general format and
*** the syntax rules for that statement,

but with which no such phrase has already
been associated. An unterminated statement is one which has not been
previously
terminated either explicitly or implicitly. (See pas IV-27, Explicit and
Implicit Scope Terminators.)"

Fujitsu COBOL flags this as an error due to nested conditional implying
that they think the not size below binds to the second add:

add a to b
    size error
         add c to d
             not size error 
                 display ...
.

Tim Josling

"William M. Klein" wrote:

> > Generally nested conditional statements become imperative, when ...
> > a distinguishd token arives as
> > lookahead.
>
> ... the "above"
> paragraph is the crux of the matter and is SIMPLY NOT TRUE.
>
> ... The *only* place (verbs) where
> a conditional statement is allowed to be nested is IF and SEARCH.
>
> ... (I know that Micro Focus has a DOCUMENTED EXTENSION - which gets flagged as
> such - when you use a conditional where an imperative is required.  However,
> even with there compiler, not all "conditional statements are allowed" where
> an imperative is required.  As far as I know, NO other compiler vendor even
> has this as an extension.)
>
> Please, PLEASE, do not try and allow conditionals where the Standard requires
> imperatives - and do not treat a conditional followed by a phrase of its
> "outside" statement to be considered imperative (unless the verb is IF or
> SEARCH - and even there, the nested statement is still considered
> conditional.)
>
> Bill Klein
>   wmklein <at> ix.netcom.com>


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