[Top][All Lists]

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

[open-cobol-list] Re :static cob 2 c: Knowing the number of params?

From: Roger While
Subject: [open-cobol-list] Re :static cob 2 c: Knowing the number of params?
Date: Thu May 18 07:33:09 2006

Firstly, grab the CVS snapshot tarball (AKA prerelease) at

(That's if you have not already done so)
This has an enormous amount of changes over 0.32

Sure you can get access to the number of call params.
In your C code do a
#include <libcob.h>

The number of call params is then available in a
field called "cob_call_params" (Auto imported from libcob).

As an extension, OC also has an internal field named
NUMBER-OF-CALL-PARAMETERS for use in Cobol progs.

You can not get the field type as the normal call-by-reference only
passes a pointer to the data area. (This is also what MF does)


I am new to OpenCobol, and I am looking at it co convert a MF application
(large, about 700 programs).

I just downloaded the source today, and was able to compile some small
programs, and call C routines from OC; OC seems really impressive!

My problem is that MF, using the old C interface (ugetput.h, usercall.c,
callargc, callargv[]...) allows for passing a variable number of parameters
to C. Is there a way to know how many parameters a C function receives (and
if possible their type...) ?

reply via email to

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