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


  • Subject: Re: X-Spec (was: "RPG isn't cool")
  • From: Carsten Flensburg <novasol@xxxxxxxxxxxx>
  • Date: Wed, 12 May 1999 20:29:02 +0200
  • Organization: Novasol Data AS

Doug,

> Of course the outcome would be nearly line by line the same as the
> original design (aside from ading D-specs for field definitions).  But
> what you would find is an *immense* improvement in readability of
> existing code that uses structured opcodes.
 
(snip)

> The increase in readability was (is) astounding.  You might be
> surprised how much it helps even old legacy code.  Based on my
> experience with RPG/free, it is no big deal to learn to read any
> source statement as: "opcode [factor1] factor2 result" instead of
> "[factor1] opcode factor2 result", regardless of the opcode.

I'm would have a hard time disagreeing with you on that -- I've
experienced the same improvements when I - now & then - spend some
quality time facelifting converted RPG/IV programs -- it's a quite
meditative task compared to design & debugging :)

Still it's true - at least in this old S/36-RPG/II shop - that some
programs are just to uggly to gain any improvements worth the effort.

The conversion process itself might also introduce bugs if not carried
out very carefully, as well as the time spent converting and testing
will have to be justifiable compared to the relative gain (you know, the
old saying "if it works don't fix it").

Having said that I think it could be an interesting challenge to follow
up on your idea developing the tool ourselves - if IBM doesn't provide
us with an adequate utility - what do you think about that?

I've also had second thoughts about carrying the move opcode to the
CF-specs; having consulted the manual I think the following bifs might
cover the majority of move-functions:

%AtoI (Alfa to integer)                           
    %AtoI(string)                                 
                                                  
%AtoF (Alfa to float)                             
    %AtoF(string {:decimal format})               
    Decimal format default: *JOBRUN               
                                                 
%Array (Move array)                               
     %Array(array|field)                           
                                                  
    D Ary          S      1a  Dim( 10 )           
    D CharFld      S     10a  Inz( 'ABCDEFGHIJ')  
    Eval    Ary      =  %Array( CharFld )         
                                                           
    Ary = 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J'         
     ... and vice versa:                                   
   Eval    CharFld  =  %Array( Ary )                     
                                                           
%Date (Convert to/from date)                              
    %Date(string|date {:date format})                     
                                                           
    Date format default: *ISO                             
    Eval    Date     =  %Date( CharDate: *USA )           
    Eval    CharDate =  %Date( Date: *DMY )               
                                                           
Operation extender O (Overlay):                           
    D String1      S     10a  Inz( '0123456789' )         
    D String2      S      6a  Inz( 'ABCDEF')              
    C              Eval(O)   String1  =  String2       
    String1 = 'ABCDEF6789'

I'm not starting to write my own version of RPG/IV, I'm merely trying to
visualize my thoughts - please add yours! - maybe we could get Hans,
George & Barbara to do some (probably additional) overtime and make the
CF-specs totally free :)

Best regards,
Carsten

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.