Page 1 of 1

string concatenation bug

Posted: Wed Jun 19, 2019 3:42 am
by streammaster
Hi Ben,
I hoped that you had a chance to fix this annoying bug in the latest versions.
The issue is if the string concatenation statement contains more then two items:

In my example the "Var_name" is an Parameter and in this example is set to "This is a test 1234567823 Var:" , the "Var" =23 and it is also a parameter
I created a macro to help me "print" some debug values on UART. I'm using the concatenation of strings:
.Stemp = ToString$ (.Var)
.Stemp = .Var_name + .Stemp
.Stemp = "@Debug_Rx:" + .Stemp +"\r\n"

When I run it I get the following:

@Debug_Rx: This is a\r\n
Note that the . Stemp in the middle in the last line is cut to 20 characters.

However, if I declare it like this:

.Stemp = ToString$ (.Var)
.Stemp = .Var_name + .Stemp
.Stemp = "@Debug_Rx:" + .Stemp
.Stemp = .Stemp + "\r\n"

When I run it I get the expected result:

@Debug_Rx: This is a test 12345678 Var:23\r\n

Can this be fixed?

Regards,
Igor

Re: string concatenation bug

Posted: Wed Jun 19, 2019 12:28 pm
by Benj
Hi Igor,

It's not something I can fix I'm afraid it's very much down in the detail of the Flowcode executable core code generation. We do have it as a task on our to do list so I'll see if I can bump up the priority a bit for you.