|
Barbara, "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. For new code, I agree. > /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. Not having direct opcode conversion for all (major) opcodes directly PREVENTS this, as even a simple tool (like CVTRPGSRC, which many people used to get a flavor of the RPG IV syntax) could not be created easily. > 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. I think that that would be less of an issue, since most do work the same. > 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.) The MOVEx family is the big one. A typical scenario: Customer requests some additional edit checking or functionality. I find the subroutine, want to change it to /free w/ a minimum of hassle and add the new code. The MOVE issue requires a lot of research to make sure an EVAL won't break existing code. Conclusion? Forget it! Just stick w/ the existing format and be done w/ it. I just think that this particular decision is one reason that /free is not being adopted as quickly as it can. I guess time will tell. -mark -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ .
As an Amazon Associate we earn from qualifying purchases.
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.