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



Hi Michael,
What you have to do is take your RPG experience out of the equation. Meaning
if your company hires someone new, and they just learned RPG recently, will
they have enough RPG experience and background knowledge to follow indicator
logic?  
Recently I moved an old S/36 application into Native mode. It was a
nightmare for me because so many conditioning indicators where in the code.
And it wasn't even a 1970s-style left-side column of indicators, row after
row, they just used them where "needed".
It was/is difficult to go back to that way of thinking. 
To solve this problem, however, I think IBM needs to add the following
built-in functions to RPG IV, and they should have considered them a long
time ago:

  %IsNumeric() 
  %IsDigits()
  %IsAlpha()
  %IsDate()

The only one we can't really do today is the %IsDate(). We can simulate the
others with the %CHECK() built-in for example:

D DIGITS    C    '0123456789'

  If  %Check(DIGITS: '1234ABC') = 0
  // all digits, so continue.
  Else
  // Houston, we have a problem
  Endif


And, just for the record, I prefer to write using the IF and EVAL opcodes in
the traditional locations, not the free format locations. 
-Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Michael Naughton
Sent: Thursday, August 19, 2004 8:24 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Indicators

Hi Bob,

Knowing you both by reputation and from this list, I have enormous respect
for you, your expertise, and your opinions. It is with all that respect
that I humbly suggest that "readability" is in the eye of the beholder. If
you find /free more readable, then I won't argue with you. Personally, I
don't, although I hasten to add that a) I don't find it "less" readable,
either, and b) I'm very open to the possibility that I may change my
opinion in the future.

The question of readability has come up before, and I don't want to open
another can of worms. But I am firmly convinced that, in programming
languages, readability has more to do with what someone is used to and
whether the logic and program flows are clean and consistent than in how
many indents you can use. At my current job, my boss has developed a
consistent structure for his programs, and once I learned what it was I
found (and still find) it very readable (and he loves left-hand
indicators). Can someone write cryptic, confusing code using left-hand
indicators? -- sure they can, and Ron posted a great example. But I have
seen code written in "free" formats that  was convoluted and confused, and
the mere fact that it was free-form didn't help anything.

In the example I posted, I took a code sample that I thought was perfectly
clear and readable and asked, "doesn't trying to eliminate the indicators
make this worse?" You, Charles, and others have shown me that the answer
is, "not necessarily". That was good, I learned something, thank you all.

But I didn't find the examples "more" readable; instead simply "as"
readable, and that's why I don't feel any incentive to put time and effort
into switching over. Like many shops, we have a huge amound of installed
code that was written in the old way.  I _do_ see great benefits in
switching to RPGIV -- in fact, I convert just about every OPM program I
work on. I love "Eval" and the string handling functions, and I think in
general the language offers huge improvements in functionality. If all
that moving on to /free will give me is "readability", though, then right
now, for me, I don't see the benefit.  But time will tell . . . .

Respectfully,

RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> writes:
>You are missing readability, which is also the number one offering of
>/free, but is that underwhlems you then I'm not sure what to say. I'm
>not trying to dig at you or suggest that you need to switch to /free,
>just that if you don't at least acknowledge the readability of things
>like /free and the PITA factor of things like left-hand indicators, then
>we are at an impasse.


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA  01376
413-863-4357 x444
mnaughton@xxxxxxxxxxxx

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

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.