[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: gnubol: Re: Magic tokens
> -----Original Message-----
<snip>
>
>
> All of the tools will be bedevilled by the fact that WHEN OTHER, and
> END_EVALUATE are optional as is END-SEARCH; so we are at epsilon
> heaven here.
> I think atleast one WHEN is required in a SEARCH (which may help! because
> explication of one prior to recurse will distinguish it perhaps)
> but actually
> no WHEN is required in an EVALUATE.
I think your problem here (again) is your trying to allow conditional
statements where an imperative is required. The END-EVALUATE is *only*
optional if the EVALUATE is terminated by a period. If you have:
Search ..
At End ...
Evaluate ...
When .... *> may or may not be here
When *> what about this one?
That "questionable" WHEN (in a conforming compiler) absolutely positively
MUST go with the EVALUATE - unless there is a preceding END-EVALUATE.
Similarly, if you have
Evaluate ...
When ...
Search ...
When ... *> what about this one?
That questionable WHEN (in a conforming compiler) absolutely positively MUST
go with the SEARCH - unless there is a preceding END-SEARCH. More
importantly, if you had
Evaluate A
When 1
Search Whatever
At End
Display "with Search"
When X = Y
Display "whatever"
When 2
Display "Illegal"
End-Evaluate
is just plain "illegal" (noncorming) syntax. That "When 2" just canNOT
legally go with the Evaluate. (Note that the "When X = Y" is actually even
optional in the SEARCH statement - without the ALL keyword)
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.