mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-08-02 01:04:45 +02:00
update for v6/v7 support
This commit is contained in:
parent
4871e9432b
commit
b10b99bd87
120 changed files with 1479 additions and 22 deletions
20
scripts/v6/ch8-06-while-infinite.rsc
Normal file
20
scripts/v6/ch8-06-while-infinite.rsc
Normal file
|
@ -0,0 +1,20 @@
|
|||
# filename: ch8-06-while-infinite.rsc
|
||||
|
||||
# Let's create an infinite loop using "while"
|
||||
|
||||
:local LoopCounter 5;
|
||||
|
||||
:while ($LoopCounter <= 10) do={
|
||||
|
||||
# print out the current loop counter value
|
||||
:put "Value of loop counter is: $LoopCounter";
|
||||
|
||||
# decrement the counter
|
||||
:set LoopCounter ($LoopCounter - 1);
|
||||
|
||||
# add in a pause to prevent cpu thrashing
|
||||
delay 1;
|
||||
}
|
||||
|
||||
# print a message when/if the loop exits
|
||||
:put "Loop has exited!";
|
Loading…
Add table
Add a link
Reference in a new issue