Will Beethoven Will Beethoven - 1 year ago 61
Swift Question

swift gets a large result than normal When I use breakpoint


I got an amazing number of finalScore, what happened?

I want to know why finalScore is 4339953456 rather than a correct number 520.

Answer Source

Your breakpoint is on the finalScore = line, it means that the program is stopped before this value has been computed.

It should show no value instead of a bogus value, probably, but this is not something that you have to worry about: set your breakpoint one line later and your finalScore will have a proper value.