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



Anybody can easily read that 'if' statement, because it is just that, one
'if' statement.  Try something with a little more real world-ness to it.
Take the following code for instance and put it into C specs and tell me
/free isn't better suited.  Heck, I need another 80 spaces to the right. . .

     P ShpNot_parse...
     P                 B                   Export
     D ShpNot_parse...
     D                 PI              N
     D  pSourceType                   3A   Value
     D  pSourceString             32767A   Value
     D  pValidate                    10I 0 Value
     D  pEncoding                    10I 0 Value
     D  pErrorProcPtr                  *   Value ProcPtr

     D DOMParser       S               *
     D DOMDoc          S               *
     D root            S               *
     D invoiceCount    S             10I 0
      /Free

       DOMParser =
         DOMParser_init(
           pSourceType: pSourceString: pValidate: 37: pErrorProcPtr);
       DOMDoc = DOMParser_getDocument(DOMParser);

       root = DOMDoc_getRootElem(gDOMDoc);
       XPathSeparator = '/';

       // Get Batch information
       batch.id = #CtoN(DOMXPath_getAttrValue(root: 'Batch/id': *Omit));
       batch.customerDivision =
         #CtoN(DOMXPath_getAttrValue(root: 'Batch/customerDivision':
*Omit));
       batch.customerSubDivision =
         #CtoN(DOMXPath_getAttrValue(root: 'Batch/customerSubDivision':
*Omit));
       batch.customerId =
         #CtoN(DOMXPath_getAttrValue(root: 'Batch/customerId': *Omit));
       batch.vendor = #CtoN(DOMXPath_getAttrValue(root: 'Batch/vendor':
*Omit));

       // Get Contact information
       invoiceCount = DOMXPath_getElemCount(root: 'Invoice');
       For i = 1 To invoiceCount By 1;
         Clear invoice;
         invoice.creationDate =
           %Date(DOMXPath_getAttrValue(root: 'Invoice/creationDate': i));
         invoice.id =
           #CtoN(DOMXPath_getAttrValue(root: 'Invoice/id': i));
         invoice.merchandiseAmount =
           #CtoN(DOMXPath_getAttrValue(root: 'Invoice/merchandiseAmount':
i));
         invoice.estimatedShipping =
           #CtoN(DOMXPath_getAttrValue(root: 'Invoice/estimatedShipping':
i));
         invoice.tax =
           #CtoN(DOMXPath_getAttrValue(root: 'Invoice/tax': i));
         invoice.purchaseOrder =
           DOMXPath_getAttrValue(root: 'Invoice/purchaseOrder': i);
         checkUserSpace();
         UsrSpc_addEntry(
           gUsrSpc.lib: gUsrSpc.name: 'Invoice': %Size(Invoice): Invoice);

         // Get the skids for this invoice
         parseSkid(DOMXPath_getElem(root: 'Invoice': i));
       EndFor;

       DOMTerminate();
       Return *On;

      /End-Free
     P ShpNot_parse...
     P                 E  


>Immediate syntax checking is a proven productivity enhancement, which is
why it is something "other languages have had for decades".  Removing it
is a really poor decision.

Just trying to get your goat.  Baahh Bahhh


<Joe>
You directly equated fixed format with lowest common denominator.  I
said it wasn't.  So now you say that RPG isn't "up with the times".
Okay, that's a different argument.  By that token, /free is also behind
the times, because /free doesn't add any major functionality to the
language.
</Joe>

I directly equated fixed format as an example of the lowest common
denominator.  Readability is definitely a feature/function/etc (whatever my
minion vocabulary allows me) that I want in the language.

Aaron


-----Original Message-----
From: Joe Pluta [mailto:joepluta@xxxxxxxxxxxxxxxxx]
Sent: Tuesday, August 05, 2003 3:06 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Adoption of new RPG techniques


> From: Bartell, Aaron L. (TC)
> 
> Now, RPG with /Free format; that is a huge revolution for RPG.
> It brings it up to the bar with what other languages have had for
> decades.  Have you done a lot of sub procedures, CGI, or XML
> programming in RPG?  If you do that in fixed format
> your code looks _a lot_ uglier.

C                   if        ReturnCode = -1                     
C                   Eval      pError = sys_errno                  
C                   eval      Error = %Str(sys_strerror(xwError)) 
C                   callp     SccErrText(Error)                   
C                   endif                                         

-becomes-

if ReturnCode = -1;
  pError = sys_errno;
  Error = %Str(sys_strerror(xwError));
  callp SccErrText(Error);      
endif;                    

What is so revolutionary?  The only difference is that I had to type
five extra semicolons and two less "evals", and I can see where the
endif belongs a little easier.  There is no change in the generated
code, no additional features, no added function.

Because it looks different is not a "revolution".

(The code above is part of my code for writing XML to the IFS, so yes, I
do a little bit of that, and yes, I write subprocedures.)


> I know I initially complained about the semicolons, but that is a very
> small price to pay for what we get with free format.

I again ask: what do you get?  Please list the five major benefits of
/free.


> <sarcasm>Why does a man who
> has "developed more and better business systems than you ever will"
(you
> being Aaron Bartell) have to have a syntax checker? </sarcasm>

Immediate syntax checking is a proven productivity enhancement, which is
why it is something "other languages have had for decades".  Removing it
is a really poor decision.


> <Joe>
> So, to try to force the majority of people to move to /free for what
is
> in effect no real value add is not progress.  It's change for change's
> sake, in my opinion.
> </Joe>
> 
> It is not just /Free that concerns me, it is the process of the lowest
> common denominator that bugs me.  They are just slowing down the
language.
> Just look at all the outsourcing to other machines we have had to do
> because RPG hasn't been up with the times.

You directly equated fixed format with lowest common denominator.  I
said it wasn't.  So now you say that RPG isn't "up with the times".
Okay, that's a different argument.  By that token, /free is also behind
the times, because /free doesn't add any major functionality to the
language.

And that is my point.

Joe

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

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.