Hello,
I think I have found an error within the flowcode string manipulation box ( Flowcode version 3 studen edition with latest update. )
I had a string "output" and an integer "input".
When I tried to do this:
output = output + ToString$(input)
it wouldn't let me..
So I had to create a third string variable "swap". This is a small work around I made..
swap = ToString$(input)
output = output + swap
Is this a bug? Or is there a reason for this? ..
Cheers
String Manipulation Error ?
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Hello Eddie,
Thanks for pointing this out. It is not a bug - it's more like a limitation. Here's the reason:
String "concatenation" (i.e. adding 2 strings together with the '+' symbol) is limited to only working with string variables or literal strings (e.g. "hello").
Creating a temporary string like you have done is the best way to get around this limitation.
Thanks for pointing this out. It is not a bug - it's more like a limitation. Here's the reason:
String "concatenation" (i.e. adding 2 strings together with the '+' symbol) is limited to only working with string variables or literal strings (e.g. "hello").
Creating a temporary string like you have done is the best way to get around this limitation.
Hello,
Yeah I should of said limitation
...
Im a C++/C programmer so going from that to flow charts is strange, not being able to use == in If box's is a pane as well
but i'll live...
One more thing:
I have made a program which compares an input to a password... I have password stored as "123" in a string variable sized 20... when I get an input I add it to another string ( output ) size 20...
When I do a print out of the var on the lcd screen it is exactly "123" but when I compare it to "123" with the compare function, I get 1 returned... where I should be getting 0...
Cheers
Yeah I should of said limitation

Im a C++/C programmer so going from that to flow charts is strange, not being able to use == in If box's is a pane as well

One more thing:
I have made a program which compares an input to a password... I have password stored as "123" in a string variable sized 20... when I get an input I add it to another string ( output ) size 20...
When I do a print out of the var on the lcd screen it is exactly "123" but when I compare it to "123" with the compare function, I get 1 returned... where I should be getting 0...
Cheers
Hey,
It's version 3.1 but I think the error is more down to my program layout.
Im basically trying to do this:
Everytime a keypad button is pressed ( if it 9 or lower ) add it into a string..
So say I pressed 1,2,3.. I would have a string like "123".
Then when they press the star key ( 10 ).. Check that string against another like 123 for example... and then perform anything I need to do.
Its such a simple task but as Im not too good with flowcode is a difficult one
Cheers
It's version 3.1 but I think the error is more down to my program layout.
Im basically trying to do this:
Everytime a keypad button is pressed ( if it 9 or lower ) add it into a string..
So say I pressed 1,2,3.. I would have a string like "123".
Then when they press the star key ( 10 ).. Check that string against another like 123 for example... and then perform anything I need to do.
Its such a simple task but as Im not too good with flowcode is a difficult one

Cheers
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Ok, one thing would be to make sure the string is terminated - i.e. once you have a complete string, at a NULL character to the end of it.
You can do this via the "Calculation" icon (NOT the string manipulation icon) like this:
(this assumes MyString contains 3 characters).
If that does not solve the problem and it looks like a bug, please send the program to us so we can check it out.
You can do this via the "Calculation" icon (NOT the string manipulation icon) like this:
Code: Select all
MyString[3] = 0
If that does not solve the problem and it looks like a bug, please send the program to us so we can check it out.