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



Jon / Richard,

> >> seeing that V3R2 RPG does not have pointer arithmetic capability?
>Simple, just write a little MI program ...
>
>It is indeed simple - and a lot simpler than writing an MI program!  Simply
>define an array over the field/DS (using BASED if needed) and use %Addr or
>the element required.

What I did while still supporting V3R2 clients was still write a little MI
program, but one which itself just did pointer arithmetic.  It accepted the
pointer itself, the offset, and (optionally) whether to ADD or SUB the offset
from the pointer, with a default of addition.  Then it just used ADDSPP or
SUBSPP and returned.

This let me walk lists in user spaces very easily.  I'd prototype the call to
the MI program so I'd have code like

     C                   Callp     AddToPtr( pEntry: EntrySize )

or

    C                    Callp     PtrMath( pEntry: offset: 'SUB' )

or whatever.

I always preferred that to the based array technique, plus it was not limited to
32767 bytes.

Doug

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.