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


This thread ...

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