Re: Prototype for QSYRTVAI
Neale Ferguson <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <[email protected]> |
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" <[email protected] on behalf of [email protected]> 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: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/c400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/c400-l. -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/c400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/c400-l.