View Single Post
  #1 (permalink)  
Old July 1st, 2018, 07:05 AM
Cilvako Cilvako is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Chapter 2 - incrementing now working as expected

In chapter 2 we have the following example:

Code:
myNumber = 1;
myVar = (myNumber ++ * 10 + 1);
In the book we are told the result for myVar should be 12, but after testing it a few times I got 11 each and every time.

How is this possible? Clearly, incrementing is not working as expected.
Reply With Quote