|
>Date: Tue, 13 Mar 2001 12:26:11 -0600 (CST) >From: Scott Klement <klemscot@klements.com> > >IMHO, this is an awkward way to do it. Instead of passing a pointer, you >should be passing a field of the correct type by reference. This allows >the compiler to do much better validity checking. > >example: > >D PrintTransform PR extproc('QwpzHostPrintTransform') >D ProcOptP 10I 0 >D OptinP 32766A options(*varsize) >D LoptInP 10I 0 >...etc.... Right. And when the parameters are input-only (the API won't change them), code CONST, so you can pass literals, or parameters of not exactly the right type, and the compiler will take care of passing exactly the right type. D PrintTransform PR extproc('QwpzHostPrintTransform') D ProcOpt 10I 0 const D Optin 32766A const options(*varsize) D LoptIn 10I 0 const D ... D Optout 32766A options(*varsize) D ... C callp PrintTransform (10 : optInfo : %size(optInfo) C etc. Barbara Morris +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.