> From: Joe Pluta
> 
> > From: Bartell, Aaron L. (TC)
> >
> > Just curious Joe, how long have you been using Java?
> 
> Four or five years, Aaron.  I probably got proficient in about a year
> and a half.  In comparison, I got proficient in RPG in about six
months,
> 
> You can add another year or so to RPG for becoming reasonably
proficient
> at ILE concepts and learning how to make use of the RPG IV features.

One point here: my knowledge of C/C++/Java has come in VERY useful as
far as taking advantage of RPG IV.  Without the experience in those
languages, I doubt I would be able to make as good of use of various RPG
IV features.  For example, I recently wrote a basic XML parser in RPG IV
in under 150 lines, using callback procedures.  The prototype looks like
this:

p XmlRead         b                   export        
d XmlRead         pi                                
d   xiFile                     128A   varying const 
d   pTagStart                     *   procptr const 
d   pTagEnd                       *   procptr const 
d   pAttribute                    *   procptr const 
d   pCDATA                        *   procptr const 
d   pOther                        *   procptr const 

You pass it an IFS file name, and the addresses of five callback
procedures.  This is a SAXP type processor, where the parser spins
through the XML file and calls procedures as it parses elements of the
XML stream.  You write the callback procedures to handle the various
events.  Very powerful, because the application code is separate from
the parser, and you can extend the XML content without having to touch
the parsing code.

It's hardly full featured, and it's not a validating parser, but for
well-formed documents, it FLIES.  And I doubt I would have even tried to
program a procedure with callbacks had I not spent a ton of time in
languages like C and Java, and gotten into the philosophy of OO.

Oh, and the parser is only 150 lines because it in turns calls an IFS
module which encapsulates the _C_IFS APIs in another 150 lines of code.
Both modules also use a common fatal error handling routine (70 lines).
So not only am I using advanced programming techniques, I'm also really
taking advantage of code reuse.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.