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



Barbara

Why not just create a new feture of the EVALR opcode that basically does the
num to char conversion and zero fills the result?

  EvalR      szText = 3

If szText is Char(5) then it would contain '00003' after the EVALR.  The
r-value could also be an expression.

Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@midrange.com [mailto:rpg400-l-bounces@midrange.com]
On Behalf Of Barbara Morris
Sent: Tuesday, February 11, 2003 6:18 PM
To: rpg400-l@midrange.com
Subject: Re: /FREE RPG compiler errors


"M. Lazarus" wrote:
> ...
>   I'm not advocating using it for new code, but when converting old 
> code it would be *very* helpful. ...

Mark, the reason MOVE and its friends aren't included in /free is that we
didn't think the MOVE opcode was the best choice for nearly all the places
it's currently used.  In the places where MOVE is a natural assignment, EVAL
works the same.

/free is more intended for new code than for converted old code.  ("Old
code" is often code that has not been significantly changed since it was
converted from RPG III.)  We don't expect or want people to do any wholesale
conversions on their code to /free.

Here are a couple of reasons why I think it's not wise to convert "all"
existing code to /free:

1. As someone already pointed out in this thread, the bifs often don't work
exactly the same way as the opcodes.  Doing a conversion would usually
require some recoding and would always require a lot of testing.

2. The issue with the icky replacement for MOVE say by %SUBST and %EDITC
would be much less likely to come up with new code as with converted RPG
code.  Trying to convert code line-by-line rather than section-by-section is
where the problems arise.  Why is that MOVE trying to put a numeric value
into the second two bytes of A, anyway?  Maybe it would be better if A was a
data structure with a zoned subfield.  If it's part of some general buildup
of the value of A, maybe several MOVE lines dealing with A could be replaced
by one concatenation expression. 
(Similar to the way two MOVEAs and a loop can often be replaced with one
string expression.)

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.