mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-02 14:14:31 +02:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
17
scripts/ch8-07-while-with-exit.rsc
Normal file
17
scripts/ch8-07-while-with-exit.rsc
Normal file
|
@ -0,0 +1,17 @@
|
|||
# filename: ch8-06-while-with-exit.rsc
|
||||
|
||||
# Let's create a loop using "while"
|
||||
|
||||
:local LoopCounter 5;
|
||||
|
||||
:while ($LoopCounter <= 10) do={
|
||||
|
||||
# print out the current loop counter value
|
||||
:put "Value of loop counter is: $LoopCounter";
|
||||
|
||||
# increment the counter
|
||||
:set LoopCounter ($LoopCounter + 1);
|
||||
}
|
||||
|
||||
# print a message when/if the loop exits
|
||||
:put "Loop has exited!";
|
Loading…
Add table
Add a link
Reference in a new issue