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



Essentially that's true, although neither form of EVAL implement the
more obscure behaviour of MOVE operations nor does EVAL tolerate
numeric overflow by default.

Granted. That's why I said, "... in the same sense that..."

But in Assembly Language the Assembler only does what you tell it to
do. If you didn't make use of a temporary then you changed the value
you are about to copy thus each element (byte) gets the same value.
With HLLs a reasonable compiler (i.e., not C and its ilk) will
generally do what is reasonably expected by the programmer.

Therein lies the rub. Maybe I want to propagate *- through the length of a
string, by setting the first 2 bytes to '*-' and then doing an operation
like %subst(mystring: 3) = mystring. I won't get it that way, you're
saying, and I think that's a loss of function. Also, if I try this with
MOVE and fixed-format RPG, I get an error about overlap not being allowed.
Just seems like a loss of function to me. But it's not one that would make
me stamp my feet and threaten to put a nail through this orange in front of
me if IBM don't change it.

Umm, memcpy() output is undefined when copying objects that overlap.
Not surprising you get unexpected behaviour. If you want predictable
behaviour for coincident operands you need to use memmove().

Of course, for predictable behavior, I might also try one of those languages
that you think are less feature rich. <dig... couldn't resist.>

%SUBARR appears to give the behaviour you expect where:

%subarr(myNumbers: 2 ) = %subarr(mynumbers : 1 );

will fill the array with the value of the first element. However, this
behaviour seems to be a side-effect and cannot be relied upon (see my
previous e-mail for supporting documentation).

Saw that post, thanks. Seems this should be under the same category as
memcpy with overlay, and not worth consideration - right?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Courage is what it takes to stand up and speak.
Courage is also what it takes to sit down and listen.
-- unknown




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.