Re: Prototype for QSYRTVAI

Barbara Morris <[email protected]>
Newsgroups gmane.comp.lang.as400.c
Organization IBM
Message-ID <[email protected]>
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-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/c400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.