Community discussions

MikroTik App
 
User avatar
dbostrom
Member Candidate
Member Candidate
Topic Author
Posts: 131
Joined: Mon Dec 05, 2005 4:45 pm

Variables including hyphens in v3: how to handle?

Sun Feb 11, 2007 9:15 pm

Certain variables produced by ROS (such as "signal-strength" output from wlan monitor command) include hyphens. The v3 scripting language does not appear to handle variable names that include hyphens, thus it's impossible to use these system-generated variables in scripts.

Does this reflect a change in the scripting language or a bug? If it's a change, how does one now use system-generated variables?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Mon Feb 12, 2007 8:56 am

in v3 you can do :put $"a-b" and it will work.
 
User avatar
dbostrom
Member Candidate
Member Candidate
Topic Author
Posts: 131
Joined: Mon Dec 05, 2005 4:45 pm

Mon Feb 12, 2007 4:11 pm

Could have --sworn-- I tried that!

Thanks!

Who is online

Users browsing this forum: Bing [Bot], intania, rmenkveld and 210 guests