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



>I believe you've hit the point that Joe 
>was making right on the head.
>And I agree - it does not make sense to 
>re-work existing code, but I
>also believe /Free to be the future.  

Interesting.

So I have an indicator-laden RPG II program that's been 'converted' to RPG
III.  Actually, I have thousands, but why quibble?  I convert it to RPG IV
so I can use some of the newer features (like subprocedures.)  I need to
make changes to the mainline, say to add a new validity check.

Do I re-write the entire program because it is butt-ugly to have a mix of
indicators and modern code?

Do I leave the mainline as-is and add a subprocedure in whatever flavour I
feel like using?

Do I add my changes to the aggregate and use indicators to stay in step with
the existing style?

Do I add my changes to the aggregate in the modern style?

If the code is ugly already, adding /free and /end-free aren't going to make
it any uglier in my opinion.  But I typically add a subprocedure, which can
lead to a jarring
C     EMPID         COMP      20001                              20  20 
C   20EMPID         COMP      29999                                2020 
C  N20              GOTO      BADMGR                                    
c                   if        isManager(empID) = FALSE                  
c                   goto      badmgr                                    
c                   endif                                               

but is it worse than
c/free                                                                  
  if (isManager(empID) = TRUE) and
      empID >= 20001 and empID <= 29999;
  exsr processManager;
  endif;                                                                
 /end-free                                                              

It sure as heck is a good marker telling me that "I've made changes here!"
But it does beg the question as to whether this furor over mixing styles is
much ado about little.  I mean, nobody is going to propose (with a straight
face) that I continue to use the indicator-style of code because that's
what's there already.  Right?

I don't use /free in product code because I have to support prior releases,
but my internal tooling has /free mixed with fixed.  I just don't see the
dilemma.
  --buck

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.