mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-06-21 01:15:43 +02:00
15 lines
472 B
Text
15 lines
472 B
Text
# 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");
|