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

Re: List Tag of [GNU-COBOL] is too long



Randall Bart wrote:

> At 12:22 PM 10/28/99 , Christopher Clark wrote:
> >     Vendors usually add custom GUI code, but the ones I've looked at acted as
> >though the GUI screen was 80 fixed-width columns by 24 rows, and used the same
> >Screen Section as the character interface.  Now I don't want to go off on
> >a rant about this...  :-)
>
> Sadly, the Screen handling which is being added to COBOL-20XX, is a pre-GUI
> interface.  It already exists in several compilers, but by the time this
> standard ships, the Screen handling will be 20 years obsolete.

    And then people wonder why jokes are made about COBOL <sigh>...  The annoying
thing is, I think the ``pack & callback'' X-Windows style of GUI could be done
well in COBOL, but the commercial vendors don't seem to be willing to do that.

    As far as the parsing issue goes, that paper that was mentioned yesterday
(http://adam.wins.uva.nl/~x/coboldef/coboldef.html) brought an interesting issue
to mind.  They give an example of difficult-to-parse that looks like the
following:

==============>8===========

IDENTIFICATION DIVISION.
PROGRAM-ID. XisYorZ.

DATA DIVISION.
WORKING-STORAGE SECTION.
01  X PIC 9 VALUE 1.
01  Y PIC 9 VALUE 2.
*    88 Z VALUE 2.
01  Z PIC 9 VALUE 2.

PROCEDURE DIVISION.
MAIN.
    IF X = Y OR Z
        DISPLAY "s"
    ELSE
        DISPLAY "f"
    END-IF.

===========>8===============

    And point out that the IF statement _parses_ differently depending on which
version of Z is included, since as a field, the actual test is:

    (X = Y) OR (X = Z)

    <value1> = <value2> OR <value3>
        => <simple-condition> OR <value3>
        => <abbreviated-combined-condition>

    but if the 88 version is included, the actual test is:

    (X = Y) OR Z              =>        (X = Y) OR (Y = 2)

    <value1> = <value2> OR <value3>
        => <simple-condition> OR <level-88-condition-name>
        => <combined-condition>

    This is ugly.  :-P  I never use abbreviated conditions, so I'd never realized
this before.  Ick.  Yuck.  The only solution I can see for this is to treat
88-level fields as pseudo-#define statements (i.e. `Z' gets defined as `(Y = 2)'),
and then eliminate level-88 statements from the grammar.  Is there another
solution that anyone's spotted?

--
 Christopher Clark   compudata@cadvision.com   ICQ#9342023
 I don't even dream of being able to speak for my company...

Ever notice that the word therapist breaks down into the rapist? Simple
coincidence? Maybe...




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