gnucobol-users
[Top][All Lists]
Advanced

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

Re: Parameters changing to NULL


From: Michael Potter
Subject: Re: Parameters changing to NULL
Date: Tue, 17 Aug 2021 20:29:00 -0400


We think we know what is going on.

We have COBOL calling C calling COBOL.

COBOL calls C with 1 parameter.
C calls COBOL with 2 parameters.

There is code in the cobol runtime system that is checking the number of parameters it was called with and NULLING out any "Extra" parameters.
But the code assumes that the number of parameters passed from COBOL To C (1) is still in effect when C calls COBOL.

does this make sense?

What is the best way to code around this?


On Mon, Aug 16, 2021 at 5:39 AM Martin Ward <martin@gkc.org.uk> wrote:
On 16/08/2021 02:25, Michael Potter wrote:
> If nothing else...   Please tell me how I can see the generated C code
> so I can study what might be happening.

cobc -C *.cbl

-C translation only; convert COBOL to C

--
                        Martin

Dr Martin Ward | Email: martin@gkc.org.uk | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

reply via email to

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