Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/c19d34e243be16855078be35aa6ac782 to your computer and use it in GitHub Desktop.
Save jpluimers/c19d34e243be16855078be35aa6ac782 to your computer and use it in GitHub Desktop.
As a follow-up on [url=http://forum.mikrotik.com/viewtopic.php?f=9&t=107970]Re: What parts of scripts can be ran from the console?[/url] as I'm wrapping my head around the language and the [url=http://wiki.mikrotik.com/wiki/Manual:Scripting#Scripting_language_manual]Scripting language manual[/url] is quite ambiguous in various places (a BNF or EBNF grammar would be really really helpful so if someone has it: please share).
[url=http://wiki.mikrotik.com/wiki/Manual:Scripting#Command_line]Apparently[/url], you can use the below three expression forms around statements, but the outcome is different:
[code][admin@MikroTikCCR1009] > :put [/system clock get value-name=date]
may/03/2016
[admin@MikroTikCCR1009] > :put {/system clock get value-name=date}
true
[admin@MikroTikCCR1009] > :put (/system clock get value-name=date)
true
[/code]
Why is that?
What's the difference between the `[]`, `{}` and `()` expressions? (i.e. are they all block statements, or a different construct? Where are they documented?).
--jeroen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment