× 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 12/04/2010, at 5:14 AM, Dennis Lovelady wrote:

Ummm... it is my understanding (perhaps flawed? Barbara? Simon? Bueller?)
that "procedures" like _memcpy are actually interfaces to the MI
instruction.

I think that's true.

I would suggest that the MI memcpy operation code (and yes, there is one -
see
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/tstudio/tech_ref/mi/MEMCPY
.htm) similarity to the C function is an engineered "coincidence."

NMI rather than MI but that's perhaps pedantry. What do you mean by 'engineered "coincidence"'? That Rochester chose to implement the same semantics as the C function but they COULD have implemented it differently to give your expected behaviour? Probably true as far as it goes but ...

I would also suggest that since IBM have opted to provide such interfaces
into the lower levels of the system, they won't take those interfaces away.
Finally, I see occasional suggestion from Barbara and others to use the MI
built-ins (see http://archive.midrange.com/rpg400-l//200301/msg00433.html as
an example), so I say that with some confidence.

True, builtins are unlikely to be removed.

As Simon tried to point out, the MEMCPY.htm link I provided above warns
about overlapping fields and undefined results, so I won't be trying the MI
after all.

"Tried"? Was I not successful?

But I still would like to know why Simon said that about it being more
likely the compiler than the MI. Is _memcpy() an interface to MI, and does
the ILE RPG compiler influence its actions?

Because that's not how I interpreted your comment. It appeared after your paragraph on %SUBST and before your paragraph on memcpy thus I presumed it referred to the behaviour of %SUBST. I see now that you might have meant it as a precursor to the memcpy paragraph.

As far as I know if you use a builtin the various HLL compilers do very little with the operands other than pass them on to the builtin.

Barbara would know more but I'm not sure it really matters.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.