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.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.