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


  • Subject: Re: Clever UNIX/C Constructs
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Tue, 02 Jan 2001 10:26:13 -0800
  • Organization: Pacer International

I've used += -= in C and they're okay, but I don't really need them.

The one I really find a headache is the ++ and -- cause that just makes
me have to think way to much to decipher a line of code.

Myvar(n++) += MyVar(--m)

That line of code is doing 3 different things at once.  
1. Subtracting 1 from m
2. Adding MyVar(m) to MyVar(n)
3. Adding 1 to n
in that order.

That is tame from some of the ones I've seen.  It gets so complicated that
it becomes very difficult to maintain.  I would much prefer:
M = M - 1
MyVar(n) = MyVar(n) + MyVar(m)
N = N + 1

Now I know what it's doing without having to decipher it.  I can live with
it if we use those constructs, but IMO we are much better off putting our
money into more useful functions.

Regards,

Jim Langston

D.BALE@handleman.com wrote:
> 
> You took the words right out of my mouth, Jim!
> 
> Dan Bale
> IT - AS/400
> Handleman Company
> 248-362-4400  Ext. 4952
> 
> -------------------------- Original Message --------------------------
> 
> I've watched this thread from the beginning. For myself, I do see value in
> short "standard" constructs. However, I see more value (in the RPG vote) in
> the new features which give us functionality currently not supported in RPG.
> They were the high priced items. At the end, to fill up to the $100, I added
> several $2-4 items that just made the existing code easier.
> imho
> jim
> 
> ----- Original Message -----
> From: "Joe Teff" <JoeTeff@earthlink.net>
> To: <RPG400-L@midrange.com>
> Sent: Saturday, December 30, 2000 8:42 AM
> Subject: RE: Clever UNIX/C Constructs
> 
> > You find no value in keying and reading this
> >      CurrentYearOpenOrders += 1;
> > instead of
> >      CurrentYearOpenOrders = CurrentYerOpenOrders + 1;
> >
> > And yes I intentionally mispelled the variable name to
> > help illustrate my point. I don't type 100 words a minute,
> > so not having to type repetitive information is also
> > valuable to me.
> >
> > Joe Teff
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.