![MikroTik RouterOS v2.9 Скачать руководство пользователя страница 650](http://html1.mh-extra.com/html/mikrotik/routeros-v2-9/routeros-v2-9_reference-manual_1794644650.webp)
<< - left shift. Binary operator, which shifts IP address by a given amount of bits. The first
argument is an IP address, the second is an integer and the result is an IP address.
<= - less or equal. Binary operator which compares two numbers, two time values or two IP
addresses. Returns boolean value
> - greater. Binary operator which compares two numbers, two time values or two IP addresses.
Returns boolean value
>= - greater or equal. Binary operator which compares two numbers, two time values or two IP
addresses. Returns boolean value
>> - right shift. Binary operator, which shifts IP address by a given amount of bits. The first
argument is an IP address, the second is an integer and the result is an IP address.
| - bitwise OR. The argumens and the result are both IP addresses
|| - logical OR. Binary operator. The argumens and the result are both logical values
Notes
When comparing two arrays note, that two arrays are equal only if their respective elements are
equal.
Example
Operator priority and evaluation order
[admin@MikroTik] ip firewall rule forward> :put (10+1-6*2=11-12=2+(-3)=-1)
false
[admin@MikroTik] ip firewall rule forward> :put (10+1-6*2=11-12=(2+(-3)=-1))
true
[admin@MikroTik] ip firewall rule forward
logical NOT
[admin@MikroTik] interface> :put (!true)
false
[admin@MikroTik] interface> :put (!(2>3))
true
[admin@MikroTik] interface>
unary minus
[admin@MikroTik] interface> :put (-1<0)
true
[admin@MikroTik] >
1
bit inversion
[admin@MikroTik] interface> :put (~255.255.0.0)
0.0.255.255
[admin@MikroTik] interface>
sum
[admin@MikroTik] interface> :put (3ms + 5s)
00:00:05.003
[admin@MikroTik] interface> :put (10.0.0.15 + 0.0.10.0)
cannot add ip address to ip address
[admin@MikroTik] interface> :put (10.0.0.15 + 10)
10.0.0.25
[admin@MikroTik] interface>
Page 636 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
Содержание RouterOS v2.9
Страница 1: ...MikroTik RouterOS v2 9 Reference Manual ...