mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-20 10:57:41 +02:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
15
scripts/ch9-05-use-global-func.rsc
Normal file
15
scripts/ch9-05-use-global-func.rsc
Normal file
|
@ -0,0 +1,15 @@
|
|||
# filename: ch9-05-use-global-func.rsc
|
||||
|
||||
# declare the name of the global function we wish to use
|
||||
# to make it available in our script
|
||||
:global RemoveSpaceFunc;
|
||||
|
||||
# creates a string that contains spaces
|
||||
:local StringWithSpaces "txBroadcast = 201";
|
||||
|
||||
# print original string
|
||||
:put ("String with spaces: $StringWithSpaces");
|
||||
|
||||
# print string that is modified by function
|
||||
:local StringNoSpaces [$RemoveSpaceFunc $StringWithSpaces];
|
||||
:put ("String with no spaces: $StringNoSpaces");
|
Loading…
Add table
Add a link
Reference in a new issue