Michael Long
Jul 12, 2022

--

I really wish people would lookup these things. Many languages like C and C++ have pre-increment and post increment operators. As well as pre/post-decrement operators.

Post increment tends to work better with arrays which, in C, are zero based. So i=0; a[i++] returns the first element but increments i in preparation for the next fetch.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet