習慣沉默2017-07-05 10:46:02
See inside the black box, the value of la
here is 0. In the sentence you marked, la == 0 ? 1 : la - 1
, the output value is indeed 1 (because la == 0
established), but there is no place in this line to assign a value to la
, so the value of la
will not change and is still 0.
黄舟2017-07-05 10:46:02
la==0?1:la-1
This statement does nothing at all and needs to be changed to;
la=la==0?1:la-1