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



Lim Hock-Chai wrote:
The practice might have went out of style 15 years ago. However, I think most RPG programmers still tend to create large program that handlers everything that is defined in a project. At least I'm. Just can't resist the temptation.

I think that is because traditionally RPG doesn't support modular programming. Although a lot of shops have been using RPGIV for while now, but most of them still doesn't allow/use modular programming. Some shops doesn't even allow service program.


I agree with you that IBM has made it hard for us to transition to free-form due to some restrictions. For me, mixing fix and free is just wrong. I think IBM should have created a new source type like xRPG that is completely free-form. This will break the burden for the IBM-RPG-compiler team of having to support both fix and free format in one compiler.


I believe free-form will give IBM-RPG-compiler team more leg room to add more power and useful functions to RPG. In long run, should benefit us. I love %kds, but I think it would be hard for RPG compiler team to support it in fix form (not sure if that is the reason that it is not supported in fix form).


Regarding %KDS, the general rule is that built-in functions are not allowed in the traditional Factor-1, Factor-2, and Result-Field entries. Why? It was just felt that 14 characters would be too restrictive for most uses of the built-in functions. Today, some BIF's like %REPLACE would be all but useless in a 14 character factor. And in the future as more and more BIF's are provided, possibly with even longer names, even the 45 character Extended-Factor-2 entry will look downright cramped!


I agree that mixing fixed and free calcs within a procedure is wrong. But I don't see anything wrong with having both fixed form and free form procedures within a module.

Is it hard to transition between fixed and free form? Perhaps for some RPG programmers. But if we made it any easier, I think some of the advantages of free form would be lost. For example, making it easier to mix fixed and free calcs would possibly result in horrible looking code.

But as I believe someone else pointed out, anyone with any experience at all with any other programming language will find it easier to adjust to the free-form syntax than to the fixed-form. If RPG programmers want RPG to gain more acceptance in the wider programming community, this is a very important consideration. The ability to document program structure by the proper indentation of code in a free-form manner is simply something that's taken for granted in the wider community. Outside of the RPG community, there's simply no debate at all on the merits of indentation.

Cheers! Hans


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.