Community discussions

MikroTik App
 
jeroenp
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam
Contact:

:for loops need better documentation.

Thu May 12, 2016 3:08 pm

The old docs are much better: https://www.mikrotik.com/documentation/ ... #ht4027627

The new docs basically tell you "good luck": http://wiki.mikrotik.com/wiki/Manual:Scripting#Loops
Command = for
Syntax =	:for <var> from=<int> to=<int> step=<int> do={ <commands> }
Description = execute commands over a given number of iterations
You might think that from= the start value, to= the finish value and the loop won't execute when step= a positive value and from= larger than to=. Or that without a step= the loop will always iterate in ascending order.

Wrong! And wrong!

In due time I'll blog about this, but the fact that newer documentation has less information than older documentation is not a good start.

--jeroen

Who is online

Users browsing this forum: eggbean and 15 guests