• Subject: RE: Clever UNIX/C Constructs
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Tue, 2 Jan 2001 11:27:39 -0800

In my introductory C class we had test questions like that and really vile
stuff with pointer arithmetic.  C syntax is very powerful and terse, but
since there's often a way to say the same thing (compiler translates it to
same executable code) more clearly, it seems to me that part of the reason
for the terseness is to allow people to show how clever they are at others'
expense. 

I like the increment (postfix only) operators and the combined
assignment/increment operators, though.

> -----Original Message-----
> From: Jim Langston [mailto:jimlangston@conexfreight.com]
> Sent: Tuesday, January 02, 2001 10:26 AM
> To: RPG400-L@midrange.com
> Subject: Re: Clever UNIX/C Constructs
> 
> 
> 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.
> 
+---
| 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 ...

Follow-Ups:

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.