mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-13 03:24:28 +02:00
global-functions: $VersionToNum: support "zero"...
... to have a clean way to generate bitmasks. [admin@mikrotik] > :put [ $VersionToNum 0.255zero0 ] 16711680 [admin@mikrotik] > :put 0x00ff0000 16711680 Once implemented everywhere the internal calculation could be changed easily.
This commit is contained in:
parent
fe52bd4a0a
commit
41b19b045a
1 changed files with 2 additions and 1 deletions
|
@ -1485,7 +1485,7 @@
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
|
|
||||||
:set Input [ $CharacterReplace $Input "." "," ];
|
:set Input [ $CharacterReplace $Input "." "," ];
|
||||||
:foreach I in={ "alpha"; "beta"; "rc" } do={
|
:foreach I in={ "zero"; "alpha"; "beta"; "rc" } do={
|
||||||
:set Input [ $CharacterReplace $Input $I ("," . $I . ",") ];
|
:set Input [ $CharacterReplace $Input $I ("," . $I . ",") ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1496,6 +1496,7 @@
|
||||||
:set Return ($Return + 0xff00);
|
:set Return ($Return + 0xff00);
|
||||||
:set Multi ($Multi / 0x100);
|
:set Multi ($Multi / 0x100);
|
||||||
} else={
|
} else={
|
||||||
|
:if ($Value = "zero") do={ }
|
||||||
:if ($Value = "alpha") do={ :set Return ($Return + 0x3f00); }
|
:if ($Value = "alpha") do={ :set Return ($Return + 0x3f00); }
|
||||||
:if ($Value = "beta") do={ :set Return ($Return + 0x5f00); }
|
:if ($Value = "beta") do={ :set Return ($Return + 0x5f00); }
|
||||||
:if ($Value = "rc") do={ :set Return ($Return + 0x7f00); }
|
:if ($Value = "rc") do={ :set Return ($Return + 0x7f00); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue