mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-28 03:49:34 +00:00
global-functions: deprecate $HexToNum
This commit is contained in:
parent
f331e8936e
commit
37cdc722a4
2 changed files with 15 additions and 14 deletions
|
|
@ -7,3 +7,18 @@
|
|||
#
|
||||
# deprecated global functions
|
||||
# https://rsc.eworm.de/
|
||||
|
||||
:global HexToNum;
|
||||
|
||||
# convert from hex (string) to num
|
||||
:set HexToNum do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global HexToNum;
|
||||
|
||||
:if ([ :pick $Input 0 ] = "*") do={
|
||||
:return [ $HexToNum [ :pick $Input 1 [ :len $Input ] ] ];
|
||||
}
|
||||
|
||||
:return [ :tonum ("0x" . $Input) ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
:global GetRandom20CharHex;
|
||||
:global GetRandomNumber;
|
||||
:global Grep;
|
||||
:global HexToNum;
|
||||
:global HumanReadableNum;
|
||||
:global IfThenElse;
|
||||
:global IsDefaultRouteReachable;
|
||||
|
|
@ -735,19 +734,6 @@
|
|||
:return [];
|
||||
}
|
||||
|
||||
# convert from hex (string) to num
|
||||
:set HexToNum do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global HexToNum;
|
||||
|
||||
:if ([ :pick $Input 0 ] = "*") do={
|
||||
:return [ $HexToNum [ :pick $Input 1 [ :len $Input ] ] ];
|
||||
}
|
||||
|
||||
:return [ :tonum ("0x" . $Input) ];
|
||||
}
|
||||
|
||||
# return human readable number
|
||||
:set HumanReadableNum do={
|
||||
:local Input [ :tonum $1 ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue