Undoc'd Feature?
|
07-09-2022, 12:20 PM
Post: #22
|
|||
|
|||
RE: Undoc'd Feature?
(07-09-2022 05:15 AM)Wes Loewer Wrote: I tried the following on several different C/C++ compilers I would contend that the Microsoft compiler is wrong and the others are correct. The effect of: Code: a = a++ ...should be: 1) Keep a record of the current value of 'a' as this is going to be the value of the expression 'a++' 2) Do a post-increment on 'a', so 'a' is now 6 3) Assign the value of the expression 'a++' retained in step 1 (i.e.: 5) to 'a' Step 3 re-assigns 5 to a. Current daily drivers: HP-41CL, HP-15C, HP-16C |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)