Community discussions

MikroTik App
 
lipnican
just joined
Topic Author
Posts: 2
Joined: Fri May 25, 2007 11:21 am

Problem whit string concatenation

Tue Mar 18, 2008 11:21 pm

Hello, I have problem whit scripting in ver. 3.4

Problem is whit string concatenation. In ver. 2.9 all working OK.
Too in ver. 3.2 is this problem OK. I not test this in ver. 3.3.

Simple example 1:

ver. 3.4
-------------
[admin@dsi] > :global mymtname dsi
[admin@dsi] > :put $mymtname
dsi
[admin@dsi] > :global bacfilename ($mymtname . ".backup")
[admin@dsi] > :put $bacfilename
dsi;.backup
-------------

dsi;.backup is not OK

OK is dsi.backup

Why ";" (inland)?

Not working either example from http://www.mikrotik.com/testdocs/ros/2. ... ontent.php

Concatenation
[admin@MikroTik] interface> :put (1,2 . 3)
1,2,3

ver. 3.4
-------------
[admin@dsi] > :put (1,2 . 3)
syntax error (line 1 column 8)
-------------

Where is problem?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Problem whit string concatenation

Wed Mar 19, 2008 12:05 am

First is known problem and will be fixed in 3.5
Second won't work because strings must be quoted:
:put ("1,2," . "3");

Who is online

Users browsing this forum: No registered users and 7 guests