Тёмный

Scripting: variable data types 

MikroTik
Подписаться 115 тыс.
Просмотров 3 тыс.
50% 1

All data types explained and demonstrated.
help.mikrotik.com/docs/displa...
00:00 Nil
00:33 Num
01:41 Bool
01:52 Str
02:03 IP and IP-prefix
02:19 IP6 and IP6-prefix
02:27 ID
03:05 Time
04:07 Array

Наука

Опубликовано:

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@FlaxTheSeedOne
@FlaxTheSeedOne 21 день назад
What I would love to see is ansible netcommon network_cli module with a propper mikrotik.ros.ros_* functions to abstract different configurations to allow for easy vendor transition. The bigger ones like Cisco with IOS/NXOS or Arista all have modules using the same functions such taht I don't need to rewrite the entire code all the time.
@kossfort1848
@kossfort1848 21 день назад
How to convert in ROS7 time from format [2024-06-06 09:35:52] to unixtime, may be some function exist ?
@X0mbiRapt0r
@X0mbiRapt0r 18 дней назад
What SSH client are you using next to VS Code there? Extension or another app? And if so, which extension?
@mikrotik
@mikrotik 18 дней назад
Just an OpenSSH client :)
@ussul6524
@ussul6524 21 день назад
Pls fix L11 Does not wrk with RB911-5HacD on longer distance then 50m. Even L11 and L11 do nto work.
@olpchk1115
@olpchk1115 21 день назад
There must be a way of errors diagnostic Because now if your script doesn't work, you will never know why
@ivosarak959
@ivosarak959 21 день назад
Scripting on MT has been slow as molasses, does one consider implementing JIT compiling of these scripts for that platform?
@mikrotik
@mikrotik 21 день назад
Not at this time.
@FlyDvorkin
@FlyDvorkin 21 день назад
"nothing" and "nil" not same equal. :local var1; :local var2 []; :put [:typeof $var1]; :put [:typeof $var2];
@mikrotik
@mikrotik 18 дней назад
Thank you for pointing that out, that's an interesting nuance.
@FlyDvorkin
@FlyDvorkin 18 дней назад
@@mikrotik I'll add another interesting observation. If we :put the result of a function that should be returns a "nothing", we will see the "nil". Moreover, inside the function itself it will still be a "nothing", and when substituting the return in the :put commanf, we will already see an "nil" :local testFunc do={ :local var; :put ("Inside function is: ".[:typeof $var]); :return $var; }; :put ("Outside function is: ".[:typeof [$testFunc]]); Result: Inside function is: nothing Outside function is: nil I think type damage occurs in the process of substituting using square brackets. This nuance causes another problem: The :nothing command is designed to produce the data type "nothing" and does it successfully. But to use this command in a script, it needs to be wrapped in square brackets so that the value is substituted, and this process convert it to the "nil". :put [:typeof [:nothing]]; Result: nil We get that the system has a command that in practical form cannot produce the intended result. I wrote a ticket about this problem, but support did not accept the arguments. P.S. For example: A simple method to substitute a real "nothing" into an expression is :put [:typeof (:)]; A simple method to substitute a "nil" into an expression is :put [:typeof []];
@mohamadbaghdadi3612
@mohamadbaghdadi3612 21 день назад
we need python in mikrotik
@mikrotik
@mikrotik 21 день назад
What would you do in python that you can't in RouterOS?
@FinlayDaG33k
@FinlayDaG33k 21 день назад
At that point, you'd get people wanting to have JavaScript as well, and Go, and Rust and because not everyone likes Python. I think it's best to just stick to the DSL they have created for RouterOS and if you really want to use Python, write a wrapper and run it in a container or something.
@kchiem
@kchiem 17 дней назад
@@mikrotik lots of people know python and it's well documented. so what would you do? save time by not having to learn another language.
Далее
Make your router run scripts, pt.2
5:51
Просмотров 4,6 тыс.
Make your router run Scripts!
6:54
Просмотров 10 тыс.
Recycled Car Tyres Get a Second Life! ♻️
00:58
Просмотров 3,5 млн
Scripting: working with Arrays
6:13
Просмотров 2,9 тыс.
The Student and The Master (Spotted In The Wild #8)
20:53
8 Must Know JavaScript Array Methods
10:05
Просмотров 1 млн
Language models on the command-line w/ Simon Willison
1:07:05
What is bridging?
3:55
Просмотров 11 тыс.
CRS520-4XS-16XQ-RM: 100 Gigabit switch of the YEAR?
3:22
MikroTik Train-The-Trainer: routers used by experts?
10:50
The valuable information in the Test Results
5:01
Просмотров 4,3 тыс.
Data Types in Python | Python for Beginners
21:58
Просмотров 92 тыс.
FullHD в 8К БЕЗ ПОТЕРЬ? | РАЗБОР
20:42