× 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 wonder how much time I've spent over the last 20 years typing...

C..lean on spacebar....code...<enter>
C..lean on spacebar....code...<enter>
C..lean on spacebar....code...<enter>   etc.?!!??

I've grown old, grey, and just a little portly (working on that one since it
is the only one of these three I can do anything about without resorting to
unnatural chemicals...) whilst doing that.

For an old RPG hack like me, /free means liberation.

"E Doc" <doc6502@xxxxxxxxx> wrote in message
news:20030425181515.28781.qmail@xxxxxxxxxxxxxxxxxxxxxxxxx
> Free-format?  I've *never* expressed an opinion on that before... <vbg>
>
> I'd say go to it, for a few reasons:
>
> 1.  /Free is easier to read and modify.
>
> 2.  /Free has improved my coding because I've had to shift to a more
modern
> coding style.
>
> 3.  I'm working in a shop where there's still a lot of OPM code.  However,
> standards here dictate that when a program is touched, for any reason, it
must
> be converted to ILE format.  In many cases, the programmers have been
using
> free-format to make their modifications.
>
> I've been helping them with the /Free learning curve, and have found that
once
> seasoned RPG programmers is overcome the initial "What the...?" the
readability
> of their code increases.  In most cases, they code faster and have better
> accuracy.
>
> 4.  /Free is good bait for inexperienced RPG programmers who have a strong
> background in languages that do support free-format coding.  Trying to get
a C
> programmer to look at RPG code is... difficult.
>
> 5.  Stylistically, I've found /Free lends itself much better to the notion
of
> subprocedures, modules, etc. than fixed-format.
>
> On the down side...
>
> 6.  SQL statements in /Free format, in a word, suck.  I cannot abide:
>
>  /Free
>   doMonkeyCount(inMonkey: outBanana );
>
>   if outBanana > squidgyNumber;
>
>  /End-Free
>
> C/Exec SQL
>  + INSERT INTO monkeyeat
>  +   VALUES(:outBanana)
> C/End-Exec
>
>  /Free
>
>     // Check SQL return code
>     if SQLSTTS = c_MYBAD;
>       handleSQLErr();
>     endif;
>
>     return outBanana;
>
>   endif;
>
>  /End-Free
>
> I'm sorry but that is ugly ugly ugly.  And having to do that each time you
want
> to do SQL is just ridiculous.
>
> I've ended up stuffing my SQL into subprocedures and coding the
subprocedures
> in fixed format because I just hate to look at the stuff.  Couldn't the
SQL
> precompiler allow free-format SQL, rather than having to have a C-spec?,
so
> you'd have:
>
>  /Free
>   doMonkeyCount(inMonkey: outBanana );
>
>   if outBanana > squidgyNumber;
>
>  /Exec SQL
>     INSERT INTO monkeyeat
>       VALUES(:outBanana)
>  /End-Exec
>
>     // Check SQL return code
>     if SQLSTTS = c_MYBAD;
>       handleSQLErr();
>     endif;
>
>     return outBanana;
>
>   endif;
>
>  /End-Free
>
>
> 5.  Everyone hates the semi-colons.  Hans, you gotta lose those.  ;)
>
> Just my two penneth.
>
> Thanks
>
> -Doc
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
> _______________________________________________
> 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.cgi/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:
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.