mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-13 12:39:32 +00:00
global-functions: $CharacterMultiply: use local variables for parameters
This commit is contained in:
parent
7dc230cceb
commit
6990084d98
1 changed files with 5 additions and 2 deletions
|
|
@ -240,9 +240,12 @@
|
|||
|
||||
# multiply given character(s)
|
||||
:set CharacterMultiply do={
|
||||
:local Str [ :tostr $1 ];
|
||||
:local Num [ :tonum $2 ];
|
||||
|
||||
:local Return "";
|
||||
:for I from=1 to=$2 do={
|
||||
:set Return ($Return . $1);
|
||||
:for I from=1 to=$Num do={
|
||||
:set Return ($Return . $Str);
|
||||
}
|
||||
:return $Return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue