Cycle AnimImage frames using Mod

BlitzMax Forums/BlitzMax Programming/Cycle AnimImage frames using Mod

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Ok, I know there's a way to cycle through AnimImage frames using Mod, so that when the highest frame is reached the result is 0..but I'll be damned if I can remember how it goes. It accomplishes the same thing as:
frame:+ 1
If frame = 8 Then frame = 0 ' Assuming frame count 0-7

but looks nicer and uses Mod somehow.

Can someone help me remember this little tidbit? I couldn't find it in the code archives.

Thanks
Russell