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 )
String Concatenation
Moderator: Benj
String Concatenation
- Attachments
-
- Concat.png
- (22.62 KiB) Downloaded 4421 times
-
- Concatination_Test.fcm
- (1.91 KiB) Downloaded 355 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: String Concatenation
Flowcode has a known limitation where it misbehaves when concatenating multiple (>2) strings. Limit the concatenation to two strings and you are fine.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: String Concatenation
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 .
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
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 .
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 .
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: String Concatenation
I have added a note to the wiki page on string operations.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis