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



That isn't why it was put there.  Go to the comp.arch newsgroup and ask
Dennis Richie.  The problem was that the original systems were programmed
with a teletype machine.  The character set was limited to 5 bit baudot,
they were VERY slow, and it was painful to enter code.  They allowed short
identifiers and terse (not to say cryptic) operators because it was so
painful to use longer ones.  This was not a language designed to be hard to
use.  It was designed to be possible to use on the limited equipment
available to the guy that designed it.

Search the web for a history of C and Unix written by Thompson and Richie.
That will clear up this point.

I am not defending these constructs in these days only defending the
integrity of the original authors and standing in opposition of revisionist
history.

Richard Jackson

-----Original Message-----
From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
Behalf Of Joel Fritz
Sent: Tuesday, January 02, 2001 1:28 PM
To: 'RPG400-L@midrange.com'
Subject: RE: Clever UNIX/C Constructs


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

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