Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A single line function to modify MOD for better pattern recognition....
#2
That's some complicated math stuff there!

Here's all one would ever need with MOD -- no matter which pattern they like best:

Code: (Select All)
For i = 10 To -10 Step -1
    Print i Mod 5, ModX(i, 5)
Next

Function ModX (num1, num2)
    ModX = ((num1 Mod num2) + num2) Mod num2
End Function
Reply


Messages In This Thread
RE: A single line function to modify MOD for better pattern recognition.... - by SMcNeill - 11-28-2022, 09:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Function IsWord%(test$) bplus 5 244 02-26-2026, 02:51 PM
Last Post: mdijkens
  A hybrid pattern-based data compressor Dav 2 380 12-24-2025, 12:06 PM
Last Post: Dav
  Sample program using the new _Files$ function eoredson 30 9,361 09-29-2025, 02:55 PM
Last Post: dakra137
  Another Dir/File compare function. eoredson 0 529 01-11-2025, 03:48 AM
Last Post: eoredson
  Button rack or hotkey function OldMoses 6 1,508 01-09-2025, 08:20 PM
Last Post: Jack002

Forum Jump:


Users browsing this thread: 1 Guest(s)