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



Hi Barbara, thanks for chiming in!

Just so I am sure I get it, an EVAL that sets a varying to the value of a fixed, that gets the size of the fixed, right? This could include trailing blanks, as I recall.

Now your MOVE example moved a longer value to a shorter. I assume that for a MOVE, the length of the varying does not change, perhaps related to the move-right. Is the original size maintained with a MOVEL, also?

Just curious and headed home, so won't be testing for a while anyhow!

Cheers
Vern

On 2/25/2013 3:44 PM, Barbara Morris wrote:
On 2013/2/23 8:21 AM, Vernon Hamberg wrote:
Everything I've done with varying variables is in free-form or EVAL
statements. I've never tried a MOVE varying to fixed, so I just tried
it. Here's the code, where I put a shorter value into a varying field
that already has a value:

MOVE of a varying to fixed works as you'd expect.

But MOVE of a fixed to a varying, or a varying to a varying, doesn't
necessarily work the way you'd expect. If you have a varying result
field in the fixed-form opcodes that have a P=pad extender, the current
length of the varying result field is not changed by the operation.

D fixedvar S 10A inz('1234567890')

D varyingvar S 10A VARYING
D INZ('abc')

c move fixedvar varyingvar

varyingvar will have the value '890' (3 bytes because it's value had
been 'abc' before, and '890' because MOVE is a move-right).



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.