每按一次,就减1的方法,有谁知道

请问谁知,这个10按一次减1,得出结果9,再按就不会再减了。每按一次,就减1的方法,有谁知道

1 Like

I love this question.

It adds to my understanding of the process of not understanding.

For our fellow English-only readers, here is my guess about what you did.

You have a Button.Click event that calculates 10-1 and displays it.
You tried it, and it keeps displaying the number 9, regardless of how many times you click it.
You want to know why the displayed number does not decrease below 9, what with all the clicking you did, am I right?

You are on the verge of learning about variables, which are used to hold values outside of other blocks, and which provide access to their values through their variable names.

To see the numbers decrease, you would need to code one of these samples:

set Label.Text to 10

When Button Click:
set Label.Text to (get Label.Text - 1)
end when

Actually, this is without variables, it uses the Label.Text as a variable.