Answer the question
In order to leave comments, you need to log in
How to change the value of a variable?
Good afternoon, tell me how to change the value of a variable?
there is an ip for example 192.168.1.1, I want to display the value 192.168.1.100
I make a script
:: local a 192.168.1.1; :local b 99; :local c ($a + $b); :put $c
192.168.1.100
So it turns out, but if you do this:
:local a [ip dhcp-server network get number=[find comment~"defau"] gateway ]; :local b 99; :local c ($a + $b); :put $c
192.168.1.1;99
produces an unexpected response.
If you print
:local a [ip dhcp-server network get number=[find comment~"defau"] gateway ]; :local b 99; :local c ($a + $b); :put [typeof $a]; :put [typeof $b]; :put [typeof $c]
the answer will be:
array
num
array
I don't quite understand how to change the value of the $a variable to num or ip.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question