|
Yes, the 2 byte area is implicitly defined.
If I have a variable length field defined to the program, and it's yet to
be used, then
dsply %len(VarLen); // should display 0
eval VarLen='Test';
dsply %len(VarLen); // should display 4
/end-free
move 'Hi There' VarLen
/free
dsply VarLen; // should display 'Hi T'
/end-free
move 'X' VarLen
/free
dsply VarLen; // shold display 'Xi T'
Hey, if you want MOVE to do all of it's tricks with Move and MoveL and
have it truncate, etc; then to allow this then for the compiler writers to
do this they have to assume you know what you are doing with the move.
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
G Armour <garmour400r@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/29/2003 08:15 AM
Please respond to RPG programming on the AS400 / iSeries
To: RPG programming on the AS400 / iSeries
<rpg400-l@xxxxxxxxxxxx>
cc:
Fax to:
Subject: Re: VARLEN dds field in RPG-IV
--- rob@xxxxxxxxx wrote:
> To check to see if the length was not set by the compiler would be as
> difficult as checking to see if this was a divide by zero:
> /free
> z=x/y;
> /end-free
> y could have been set in the program, could have been passed in as a
> parameter, could have been read in from a file. Same story with the
> length.
But y would have been *defined*. If I just reference a VARLEN field by
name, is the
2-byte length area implicitly defined? Probably the answer is yes, but
that was the
debate I was having with myself.
> Would you be happy with a warning message
> RNF.... The MOVE opcode is about to be deprecated. Find a better
> alternative
LOL! Yes, that would be great!
GA
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.