String Concatenation

A forums to allow resolved bugs and problems with Flowcode v7 to be stored and marked as resolved.

Moderator: Benj

User avatar
Alan_37
Posts: 142
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 50 times
Been thanked: 46 times
Contact:

String Concatenation

Postby Alan_37 » Sun Sep 04, 2016 3:35 pm

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 )
Attachments
Concat.png
Concat.png (22.62 KiB) Viewed 2339 times
Concatination_Test.fcm
(1.91 KiB) Downloaded 73 times

kersing
Valued Contributor
Valued Contributor
Posts: 1809
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 484 times
Been thanked: 1000 times
Contact:

Re: String Concatenation

Postby kersing » Sun Sep 04, 2016 4:13 pm

Flowcode has a known limitation where it misbehaves when concatenating multiple (>2) strings. Limit the concatenation to two strings and you are fine.
These users thanked the author kersing for the post:
Alan_37 (Sun Sep 04, 2016 5:23 pm)
Rating: 5.88%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Alan_37
Posts: 142
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 50 times
Been thanked: 46 times
Contact:

Re: String Concatenation

Postby Alan_37 » Sun Sep 04, 2016 5:23 pm

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 .

User avatar
Alan_37
Posts: 142
Joined: Sun May 01, 2016 8:36 pm
Has thanked: 50 times
Been thanked: 46 times
Contact:

Re: String Concatenation

Postby Alan_37 » Sun Sep 04, 2016 11:01 pm

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 .

kersing
Valued Contributor
Valued Contributor
Posts: 1809
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 484 times
Been thanked: 1000 times
Contact:

Re: String Concatenation

Postby kersing » Sun Sep 04, 2016 11:12 pm

I have added a note to the wiki page on string operations.
These users thanked the author kersing for the post (total 3):
LeighM (Mon Sep 05, 2016 9:18 am) • Benj (Mon Sep 05, 2016 5:28 pm) • Alan_37 (Mon Sep 05, 2016 6:59 pm)
Rating: 17.65%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis