Using the code from the example, I get this error
If you remove the "end", then the logic of the final ic10 code will suffer, but the error in icX will disappear.
this also applies to "while"
, probably a purely visual error, but in any case confusing
(I used a translator from Russian)