×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Thanks for the explanation. I also missed that the parameter in question was an output parameter which explains why its prototype was different.
On 6/14/18, 19:03, "C400-L on behalf of Barbara Morris" <c400-l-bounces@xxxxxxxxxxxx on behalf of bmorris@xxxxxxxxxx> wrote:
On 2018-06-14 10:38 AM, Neale Ferguson wrote:
> I exercised the API and int * is correct.
Both "int" and "int *" behave the same for a linkage(OS) call.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzarh/cpprog278.htm
It says that all arguments except pointers and aggregates are copied to
a temporary and the address of the temporary is passed.
So if the prototype has just "int", it will pass a pointer to the
integer parameter. If the parameter is "int *", it's already a pointer,
so it will just pass the parameter directly.
-- Barbara
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/c400-l.
As an Amazon Associate we earn from qualifying purchases.