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

RE: gnubol: Braiding #1 #2 #3




> -----Original Message-----
> From: owner-gnu-cobol@wallace.lusars.net
> [mailto:owner-gnu-cobol@wallace.lusars.net]On Behalf Of
> RKRayhawk@aol.com
  <snip>

>
> Generally nested conditional statements become imperative, when they are
> either explicitly scope terminated, or when a distinguishd token arives as
> lookahead.
>

I have snipped most of the examples and discussion because the "above"
paragraph is the crux of the matter and is SIMPLY NOT TRUE. (The part about
the scope terminator is true, but the rest is FALSE.)

Possibly you got confused because you read some rules in the '85 Standard
that were FIXED in the Corrections Amendment.  The *only* place (verbs) where
a conditional statement is allowed to be nested is IF and SEARCH.  In *all*
other cases ALMOST ALL compilers are strict about enforcing the rule that you
MUST only imbed imperative statements (which could be a conditional with its
scope terminator, e.g. EVALUATE ... END-EVALUATE).  It is VERY unusual in the
existing "code base" to have code that violates the "legalism" about
imperative statements.

(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.