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



Mel et al,

>Not having to type the long variable name twice saves time and,
>on average, half the typographical errors made when typing it
>twice.

To me it is not the typing time; though my typing is only around 70wpm.

A bigger factor is the tendency to fit better with line continuation, especially
if using extended factor 2 syntax as opposed to /free.

However, to me the *biggest* benefit is that I personally consider it MORE
readable than "a = a + b".  Why?  For the same reason I prefer to leave factor 1
blank with an ADD opcode, if it matches the result field.

An example like "a = a + b" doesn't do it justice, because you can instantly see
the field a is exactly the same on both sides of the equation.  However, even
without long variable names, legacy code can lead to cryptic field names which
on first blush can almost appear to be the same but actually have one letter
which is different.  Using ADD, I'd always leave factor1 blank (except when RPG
II did not allow that, I'm a dinosaur<g>) because I liked being able to not have
to compare the field names to the result field, even if only 6 characters.

The operands like += only look non-obvious when you first run into it.  Once you
learn what it means, no matter if that was from C or PHP or RPG IV, you very
quickly adapt and will shortly PREFER it to having to compare exact spellings of
field names to make sure they are the exact same things.

To me, it is NOT a typing issue.  I learned long ago than program maintenance
time is a bigger thing the how long it takes to key in a section of code.

How many of you still put a field name in factor 1 if it matches the result
field of an ADD operation?  Why or why not?  To me, typing has little to do with
it, even with 6 character field names.

Doug

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.