11-04-2016 06:45 AM
Here is the simple program
The setting for Counter_01 are : counter initial is 0, type is increment, and step size is 1. The program just output the current counter. So I think the output should be like this:
Prompt: counter right now zero
But actually when the program run, the output is:
Prompt: counter right now one
That means on the first time the counter value is initial + 1 (or -1 if it is decrease) ? Not initial value?
Solved! Go to Solution.
11-04-2016 06:51 AM
The counter initializes AND increments the first time. So it exits with
value 1. From then on, it just increments. If you need it to exit with
value 0, then set its InitialValue to -1.
11-04-2016 06:51 AM
The counter initializes AND increments the first time. So it exits with
value 1. From then on, it just increments. If you need it to exit with
value 0, then set its InitialValue to -1.
11-04-2016 06:58 AM
Just read the source code for counter.java, it actually works like there... Thanks for the answer
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide