logical OR bug

:local ivar [:tobool (0=0)]; while (($ivar || !$ivar)) do={:put “IN while loop”;:delay 5s;};:put “NOT in the loop”;
IN while loop



:local ivar [:tobool (0=0)]; while (($ivar OR !$ivar)) do={:put “IN while loop”;:delay 5s;};:put “NOT in the loop”;
NOT in the loop

I don’t know why in the hell it treats ‘OR’ as a different keyword from ‘or’, but lower case it works as expected:

[admin@MikroTik] > :local ivar [:tobool (0=0)]; while (($ivar || !$ivar)) do={:put "IN while loop
";:delay 5s;};:put "NOT in the loop";   
IN while loop
interrupted
[admin@MikroTik] > :local ivar [:tobool (0=0)]; while (($ivar or !$ivar)) do={:put "IN while loop
";:delay 5s;};:put "NOT in the loop";   
IN while loop
interrupted
[admin@MikroTik] > :local ivar [:tobool (0=0)]; while (($ivar OR !$ivar)) do={:put "IN while loop
";:delay 5s;};:put "NOT in the loop";   
NOT in the loop
[admin@MikroTik] >

probably because there’s no ‘:LOCAL’ or ‘:Local’ or even ‘/Interface print’ commands %) they are all case-sensitive =)

Then why does it parse, and get evaluated differently? At least it should throw a parser error, I would think.
:LOCAL throws an “unexpected command error in line a column b”.

please somebody explain how it is parsed :smiley:

[admin@MikroTik] > {:local one 1; :local here "HeRe!"; :put (one two thre ORANGE bla-bla-bla "I'm ".here) }
I'm HeRe!

cute. That brings up more questions, why are these are equivalent (or are they):

(assuming one defined as :local one 1)
:put (one)
:put (one one)
:put ($one)

and what ROS thinks two thre ORANGE bla-bla-bla are? typeof says they’re of type nil