|
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
As an Amazon Associate we earn from qualifying purchases.
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.