🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.ibm
Article #971

Re: Passing by Reference in CPI-C

#971
From: Pam Williams
Date: Wed, 15 May 1991 17:01
26 lines
1377 bytes

Following is a reply I received -- pjw

I'm replying to your question in the protocols.ibm (?) newsgroup about
why you need to pass a pointer to an input only integer in CPI-C.

The reason behind this is that the CPI-C interface was intended to
be the same from all languages.  The CPI-C implementation code would
not have to know from which language a call came from.  So, for some
languages which only support call by reference (do Fortran or COBOL
fall in this category?  are there any?) CPI-C requires everything
to be passed as a pointer (C's version of call by reference).

I'll admit that for C, this is very counter-intuitive and can end
up being downright ugly coding style.

Feel free to post this to the newsgroup if you would like.

By the way, do anyone contact you about CPI-C test cases?

Peter J. Schwaller
APPC Market Enablement
IBM Corp.

As usual, my opinions are my own and not necessarily shared by my employer.
Technical Details
Message-ID: <2110004@hpcuhc.cup.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpyhde4!hpycla!hpcuhc!pjw
References: <2110003@hpcuhc.cup.hp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpyhde4!hpycla!hpcuhc!pjw
From: pjw@hpcuhc.cup.hp.com (Pam Williams)
Newsgroups: comp.protocols.ibm
Subject: Re: Passing by Reference in CPI-C
Message-ID: <2110004@hpcuhc.cup.hp.com>
Date: 15 May 91 17:01:05 GMT
References: <2110003@hpcuhc.cup.hp.com>
Organization: Hewlett Packard, Cupertino
Lines: 26