× 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.



DeLong, Eric wrote:
James,

Yes, C has prototypes, but you cannot use an RPG prototype in the C
compiler, nor can you use a C prototype in the RPG compiler. I can
definitely say that making a set of RPG prototypes that is equivalent to a
set of C prototypes (.H) is a somewhat daunting task. A tool to translate a
prototype definitions might be very useful, but I'm not aware of any such
tools.

Yes, you are correct. I didn't mean to imply that a prototype coded in C could be used by the RPG compiler. Rather that a C function coded with an RPG prototype could be used. Similarly, the C compiler cannot use an RPG coded prototype, but can use an RPG procedure with a C prototype. Sorry for the confusion.


Note that here there is potential trouble. What if you code the prototype incorrectly? Of course this is possible regardless of C. Normally /COPY is used to keep the declarations the same, but you could code a prototype in RPG one way in one source member, then prototype it another way in another source member. It would compile, but Bad Things would happen at run time.

James Rich

"As for security, being lectured by Microsoft is like receiving wise words on the subject of compassion from Stalin."
-- mormop on lwn.net



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.