I have a meter broken into ten images. I want the first image to show for one second only, then the second image to show for one second only, and so on all the way up the ten images and then start again. I hope that makes sense. It’s basically counting seconds, and the visible image “moves” up the line. In any case, I know one way to do it, but I need to be able to grab the last digit of the seconds. Here is what I’m thinking…

$#Ds#==0?100:0$ for the first image

$#Ds#==1?100:0$ for the second

$#Ds#==2?100:0$ for the third, and so on.

But instead of #Ds#, which gives both digits, I need just the last digit so I can count from 0 to 9. So, is there a way to grab the last digit? I’ve searched everywhere and haven’t found one. And if not, is there another way to accomplish what I’m trying to do?

Thanks in advance.