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



On 06-Oct-2016 22:19 -0500, Buck Calabro wrote:
On 6 October 2016 at 21:09, CRPence<crpbottle@xxxxxxxxx> wrote:
[…]

[DUMP(A) shows some variables NOT ADDRESSABLE]
(http://archive.midrange.com/rpg400-l/201601/msg00244.html)
"That issue with levels of indirection happens when there's a
pointer subfield in a data structure that's either based or passed
by reference, …"

[Pointer / Based issue]
(http://archive.midrange.com/rpg400-l/200605/msg00437.html)
"… the problem you are seeing is due to a limitation of the
debugger. It can't evaluate any variable that is based on a
pointer that is itself based. (A parameter passed by reference is
considered "based" on the address of the passed parameter.) …"

Hm. I recall the DUMP(A) thread :-) but it's not immediately obvious
to me that Peter's example has more than one level of indirection.


From the OP:

d OB0050AN pi
d @RETURNCODE 2a
d @CALLER 10a
d ptrPARMS *
d @PARMS e ds extname(OB0050PR) based(ptrPARMS)

So I infer, though quite possibly I am incorrect, that the following [might be useful to] describes the situation.?:

• Variable [that is based]:

@PARMS

• First-level basing [per explicit BASED(ptrPARMS)] might be expressed as:

ptrPARMS->@PARMS

• Second-level basing [per second link above, that "A parameter passed by reference is considered 'based' on the address of the passed parameter", thus @PARMS is a "variable that is based on a pointer that is itself based"; though the /visibility/ of that basing lacking conspicuousness, because there is no /name/ by which the pointer is known\accessible to the programmer -- the pointer just _is_] might be expressed as:

by_reference_ptr->ptrPARMS->@PARMS


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.