Common on now....it wasn't "messing with it", it was a LEARNING experience.

"Thanks" to all who contributed. Aside from taking a wild guess at the use
of "d_namelen", I still haven't come up with any documentation showing the
issue (at least documentation that meant anything to an RPG pgmr).
However, Scott K's website and tutorial did provide a lot of insight into
the pointers and how/why they are being used.

Thanks again, everyone.

Paul T.



message: 6
date: Wed, 13 Aug 2008 12:34:12 -0400
from: Jon Paris <Jon.Paris@xxxxxxxxxxxxxx>
subject: Re: %str(%addr()) vrs direct value reference.


On 13-Aug-08, at 12:13 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

Everything works fine. My problem is I don't understand what
%str(%addr(d_name)) is doing and why it is needed.

So probably messing with it wasn't a good idea <grin>

You are dealing with C functions - so the name string is null
terminated (hex 00) - that is what %STR is doing - converting the
pointer that references the null-terminated string to a "normal" RPG
string. They look the same in debug because unless you display in hex
the X'00' won't show on the 5250.

Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].