mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-26 03:38:38 +02:00
Initial Commit
This commit is contained in:
parent
71b6bca8fb
commit
dae9b8ac59
2 changed files with 40 additions and 0 deletions
17
RouterOS_Modulo.rsc
Normal file
17
RouterOS_Modulo.rsc
Normal file
|
@ -0,0 +1,17 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Modulo function
|
||||
|
||||
:global Modulo do={
|
||||
|
||||
:local truncated;
|
||||
:local reminder;
|
||||
|
||||
:set $truncated ($number / $modulo);
|
||||
:set $reminder ($number - ($modulo * $truncated));
|
||||
|
||||
:return $reminder
|
||||
|
||||
}
|
||||
|
||||
$Modulo number=5 modulo=2;
|
Loading…
Add table
Add a link
Reference in a new issue