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

gnubol: Realia - SEARCH and EVALUATE



Note from one of the Realia developers.

Bill Klein
  wmklein <at> ix.netcom.com

-----Original Message-----

"Hi Bill - well I tried it.   Realia has always been "good" at allowing
missing scope terminators, allowing an outer statement to end the scope of
an inner one.  But in the past we issued an I-level (informational) warning
about the missing scope terminator.  With our current release, using the
default "Realia" dialect, I did not get the warning any more, however when I
specify an ANSI-85 or IBM dialect a flagging error is issued that the scope
terminator was missing. Other dialects   ...
I think I have shown you the example of what I do all the time (which Don
Nelson hates) - rather than counting a million END-IF's at the end of code
such as:

	IF condition1
		do something
	ELSE
	IF condition2
		do something
	ELSE
	IF ...

	END-IF, END-IF, END-IF, .....

because nobody ever gets the number of END-IFs right (and they do not like
using EVALUATE TRUE for these kinds of things), I do:
	PERFORM
	IF condition
		do something
	ELSE
	IF condition
		etc...

	END-PERFORM

And let the END-PERFORM end the scope of all the inner IF's.  I find it very
convenient.  But it is taking advantage of our extension to relax those
rules.  I agree from your example that programmers can make mistakes this
way, but I think mostly our users prefer the relaxed rules."



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