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

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.