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

Re: gnubol: Anyone actually working on Cobol



Tim Josling wrote:

> I was thinking about this yesterday, looking at the design for
> the runtime eg for search, inspect unstring etc, and I realised
> that you will probably need pointers. All the vendors have
> pointers but the implementationa are all exactly different. What
> would be the preferred model.

    IMHO, since pointers are going into the next version of COBOL, we should do
what the Committee Draft says.  Lessee...  (I'm pulling from CD1.2, so some of this
may have changed.)

    Verbs:

        ALLOCATE arithmetic-expression CHARACTERS [INITIALIZED] RETURNING
pointer-name
        ALLOCATE data-name [INITIALIZED] RETURNING pointer-name
        FREE pointer-name
        SET ADDRESS OF based-data-name TO pointer-identifier
        SET pointer-identifier TO pointer-identifier

            gnubol extension:  Also permit MOVE pointer-identifier TO
pointer-identifier?

        SET pointer-identifier UP BY arithmetic-expression
        SET pointer-identifier DOWN BY arithmetic-expression

            gnubol extension:  Also permit ADD number TO pointer identifier,
SUBTRACT number FROM pointer-identifier?

    and USAGE POINTER and WITH POINTER clauses for data.

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

Efforts to maintain the "purity" of a language (whether natural or artificial) only
succeed in establishing an elite class of people who know the shibboleths. Ordinary
folks know better, even if they don't know what "shibboleth" means.
     -- Larry Wall




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