gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] Library "super" procedure.


From: Dave Stratford
Subject: Re: [open-cobol-list] Library "super" procedure.
Date: Sat, 11 May 2013 15:20:04 +0100 (BST)
User-agent: SquirrelMail/1.4.8-21.el5.centos

Patrick wrote:
> Hi Fred
>
> Yes thanks, that was totally wrong.
>
> If you can stand looking at a little more untested trash code...
>
> I am still trying to think through designing nice wrappers for C
> libraries.
>
> Do you think it would be logical to do something like this
>
> 88 "Function-Foo"
> 88 "Function-Poo"
> 88 "Function-Doo"

Remove the quotes. I'm assuming these will actually read something like:
01 Which          PIC X.
88 Function-Foo   VALUE "F".
88 Function-Poo   VALUE "P".
88 Function-Doo   VALUE "D".

or similar?

> and have their top level parent marked as external.
>
> Then in the procedure section have something like
>
>
>   EVALUATE Which
>            WHEN "Function-Foo" CALL "foo"
>            WHEN "Function-poo" CALL "poo"
>            WHEN "Function-doo" CALL "doo"
>   END-EVALUATE.

Again remove the quotes from the first bit:

WHEN Function-Foo CALL "foo"

etc.

I do this all the time, Just make sure you set Which to an appropriate
value at the correct point, and validate it properly if necessary when you
get to the EVALUATE.

Dave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]