Replies: 1 comment
-
|
Thanks for this suggestion, much appreciated. It is interesting that you raise this, as I had a long debate debate with myself about this topic when writing the book. I couldn't decide whether to include it or not, as it is a valuable method of breaking out of loops. I "chickened out" of including it, as I was worried about people including it in their code if they did not fully understand the impact if they have syntax errors in the ":do { }" block of their code. The book is aimed at people of all abilities, so I was slightly concerned that people with less experience might see a code example in isolation and use it without understanding the caveats around using it. Your suggestion has made me think again about this topic. I think in retrospect I should have included it in the defensive coding section. Leave this one with me and I may add it in to chapter 10, with a forward reference from chapter 8 about the technique. I only have a certain amount of "wiggle room" of what I can add before Amazon decide that my manuscript has to be a new release of the book, but I think I could squeeze this one in. I may also include an article on the web site to cover this so that it is available to a wider audience, including those who have an earlier paper copy. Thanks again for raising this one. Regards Nigel. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Although the global command
is covered in section Error trapping of Chapter 10, it might be interesting to show in Chapter 8 how it can be used to break
:for,:foreachand:whileloops. In this post of MikroTik Forum there is an interesting example of that.This is its output.
Beta Was this translation helpful? Give feedback.
All reactions