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



Bob wrote:
>I'm always interested in making RPG be a better language. All areas need
>to be improved, not just those that I use. And you're right, I have yet
>to use a single line of /FREE stuff in my code, (experimental or
>otherwise). The only /FREE stuff I've written has been in email clients
>sending messages to this group. Why? Because the syntax isn't good
>enough for me to use it yet.
>
>What would they have to do to fix that?
>
>Get rid of the /FREE - /End-FREE requirement. A blank in column 6 should
>indicate a non-traditional calc spec.

This one is possible, we think.


>Remove the semi colon requirement from the end of conditional statements
>IF/ELSE/ENDIF/DO etc.

Won't happen, since there's apparently a bit of /free code
already out there.  We would have to introduce some syntax
to indicate statement continuation (such as Python's \),
which would cause existing code to not compile.

Besides, we'd then be back to that "more than one way to
do it" syndrome that you seem to dislike so much!


>Add a "Move corresponding" operation code to the language (<g> just a
>COBOL pun).

That's on our "proposed enhancements" list.


>Include the MOVE and MOVEL operation codes as they work today. There is
>not technical reason that I've heard, as to why MOVE and MOVEL were left
>out. I use EVAL mostly today in my traditional-syntax RPG IV. But I
>don't want to nest %subst() and other built-in functions just to make an
>EVAL simulate what a MOVEL does.
>Take a look at this example from CodeStudio's "Modernize" feature:
>
>Original Code:
>
>     C                   MOVEL     src           target
>
>Modernized Code:
>
>     C                   Eval      %SUBST(target:1:%len(src)) = src
>
>Is that more clear? Well, it might be to a non-RPG programmer. But so
>what? Let those who worry about non-RPG programmers maintaining their
>code, use EVAL. Let use RPG programmers use MOVE/MOVEL.

This raises an interesting question.  When you read a
program in some language, and you see a value assigned to
a variable, do you expect that the entire variable is
changed?  Or do you expect that just the right-most (or
left-most) bytes get changed?

Yes, to properly convert MOVE/MOVEL to EVAL, you need to
do some funny gymnastics to duplicate the exact semantics
of the MOVE.  But which operation is more common:  Full
replacement of the value in the target variable?  Or just
changing right-most (or left-most) bytes?

The semantics of numeric MOVE's is even more convoluted
in the general case, and is hardly worth preserving a
convenient syntax for.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.