Undoc'd Feature?
|
07-03-2022, 07:34 PM
Post: #12
|
|||
|
|||
RE: Undoc'd Feature?
(07-03-2022 06:31 PM)parisse Wrote: I think it's bad to increment a variable and simultaneously do an assignation, because it's confusing... Agreed. I was just using that as a simple example to show the difference. More realistic examples are commonly used expressions like a[i++] vs a[++i] which give different results. In my younger days, I learned C after having learned BASIC, Pascal, COBOL, and Fortran. I was so impressed with C's terseness. The fact that if ((a=b++)==c) was a legal statement was mind bending for me. Assign b to a, increment b, compare a and c and branch accordingly, all in one statement! Gotta love it. Granted, this should not be done, but I thought it was so cool that it could be done. I've hopefully matured since then. :-) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)