|
... So although C always widens the return value telling RPG that it's
not widened makes things work. Why is that so? Is it because RPG is
being warned that a C function is being called, it knows the C
function will always widen the return value, and so it adjusts which
bytes of the return value it uses according to the size and type of
the variable specified on the left-hand side of the assignment? My conclusion is that unless I specify either *CWIDEN or *CNOWIDEN I cannot make C and RPG behave properly and since I have other reasons for not using those my only option is to write a conversion routine in a language other than C (e.g., RPG) to convert the int returned by C into a 1-byte char for use by RPG or COBOL.
Can anyone (hello Barbara) confirm this?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.