Hello Everyone,
Just a quick post here…
Today I have seen a code snippet which makes me quite happy.
|
|
The the output of this is:
|
|
It was a little suprising for me at first sight.
I thought that what the hell is -->
operator.
After then I understand that it is actually x--
and >
. X compared with 0 (cheked if it is bigger than 0) and then it is decremented by 1.
Therefore, this loop can be decoded to this:
|
|
After the mistery solved, I still like this approach. I am planning to use it in my code.
Hope to see you soon, again.