|
Hi Michael,value
I thought that the parm list was local to the call level? So that when
return from the recursive call, your parm list hadn't changed in the
instance?
That'd be true if you're passing the contents by value. (i.e. with the
VALUE d-spec keyword on your prototype)
When I returned back to the first instance the parm variable was the
but Iof the last instance.
Sounds like you're passing by reference.
I obviously thought I was okay with using the parms in the procedure,
listguess I need to move them to local variables in the produce.
Produce? Do you mean procedure? heh... bugs in a procedure are one
thing, bugs in produce are quite another :)
Anyway, what you really need is to understand the difference between
passing by reference and passing by value, and use the correct one for
what you're doing.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.