Page 1 of 1

String Concatenation

Posted: Sun Sep 04, 2016 3:35 pm
by Alan_37
Hi

Hi after 2 days trying to debug and see what is wrong , I found that this is a bug in Flowcode

So Here it is, having the following Variables : String_1[100] , Result_string[100]

If i put the following in a loop it will work perfectly until the Result_string is 100 characters long so that is fine :
Result_string = Result_string + String_1

But if I put the following in a loop the result string STOPS Concatenating when it reaches 21 characters long :
Result_string = Result_string + String_1 + ">"


It is not Possible to detect this in simulation it only happens when the program is downloaded to the MCU ( Arduino Mega 2560 )

Re: String Concatenation

Posted: Sun Sep 04, 2016 4:13 pm
by kersing
Flowcode has a known limitation where it misbehaves when concatenating multiple (>2) strings. Limit the concatenation to two strings and you are fine.

Re: String Concatenation

Posted: Sun Sep 04, 2016 5:23 pm
by Alan_37
Hi kersing Thanks for your reply .

OK good to know of this known limitation for such a Basic Function in V7 .

So ok splitting the concatenation in 2 parts should solve my problem.

Thanks .

Re: String Concatenation

Posted: Sun Sep 04, 2016 11:01 pm
by Alan_37
Yes i can confirm that by splitting the concatenation in 2 parts will do it .

Result_string = Result_string + String_1
Result_string = Result_string + ">"

Just another small thing , is there a POST or a page on the wiki with a list of these known limitations ?
cause that would have saved a lot of time .

Re: String Concatenation

Posted: Sun Sep 04, 2016 11:12 pm
by kersing
I have added a note to the wiki page on string operations.