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



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
--
[ Picked text/plain from multipart/alternative ]
Thanks for the help on this occasion and for all the other little tips and
pieces of guidance that I've read over the past few months.

Mark

> -----Original Message-----
> From: Ken Sims [SMTP:mr2087@ke9nr.net]
> Sent: Wednesday, December 04, 2002 9:56 PM
> To:   rpg400-l@midrange.com
> Subject:      RE: Passing Multi-Occurence Data Structures
>
> Hi Buck, et.al. -
>
> >It's an interesting design question.  If you pass a pointer to a global
> >MODS, then in reality you can simply omit the pointer and have the
> >subprocedure directly manipulate the MODS.  On the other hand, having a
> >pointer in the parameter list shows your intent to use the data structure
> in
> >the subprocedure.  I think I would pass the pointer.
>
> I agree with passing the pointer and using a local MODS based on that
> pointer.  Among other things, it allows the procedure to be put into a
> service program or different module without requiring any changes, as long
> as everything else in the procedure also is passed.
>
> The one gotcha to watch for: %addr(MODS) passes a pointer to the CURRENT
> occurrence of the MODS.  So if the procedure wants to use all of the
> occurrences in the MODS, rather than just one, you need to set the current
> occurrence to the first occurrence before calling the procedure.  Another
> option would be to initialize a pointer to the beginning of the MODS and
> just pass that pointer all of the time instead of using %ADDR.
>
> (Can you guess how I know about this?  <G>)
>
> Ken
> Opinions expressed are my own and do not necessarily represent the views
> of
> my employer or anyone in their right mind.
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
--

--
---------------------------------------------------------------
This e-mail, including any attachments, contains information
that is private and confidential and solely intended for the
addressee or addressees. If you are not the named or intended
recipient, please inform the sender immediately by reply
transmission and delete this e-mail, including any attachments,
without opening or copying it. In addition, in this event you
are hereby notified that any disclosure, reading, reproduction,
dissemination, distribution or any other use of this e-mail,
including any attachments, is strictly prohibited. No warranty
or guarantee is given with respect to the correct and accurate
transmission of the content as well as with respect to the
timely receipt of a sent e-mail.

Messages and attachments are scanned for all viruses known. If
this message contains password-protected attachments, the files
have NOT been scanned for viruses by the Fortis.com mail
domain. Always scan attachments before opening them.
---------------------------------------------------------------

--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.