New Features: ++(expr)

Don Comeau ddc at osupyr.UUCP
Mon Feb 8 15:51:52 AEST 1988


Since everyone else is suggesting their addtion to C, here is one I
think would be useful.  Why are ++ and -- still limited to lvalues?  I
think ++expresion should be an expression which has the value
expression+1.

Are there any good reason why this hasn't been done?

Yes, I do know my history.  ++ and -- were originally implemented via
machine instructions which played with memory.  That is fine, but it
doesn't explain why that limitation should be inherent in C itself.

( I guess expression++ could also be legal, but fairly useless! :-)

Flames welcome!  Maybe I'd learn something.

Don Comeau
Dept of Chemistry
Ohio State University
BITNET:  TS3655 at OHSTMVSA



More information about the Comp.lang.c mailing list