Hello,
Is there a reason why this works:
S = ToString$(Seconds)
M = ToString$(Minutes)
H = ToString$(Hours)
Timestring = H + ":" + M
Result = 14:45
and this doesn't:
S = ToString$(Seconds)
M = ToString$(Minutes)
H = ToString$(Hours)
Timestring = H + ":" + M + ":" + S
Errormessage = one or more of the string manipulation lines are invalid.
S, M and H are dimensioned as [5]
Timestring is dimensioned as [20]
Is this a bug?
Best regards,
String manipulation
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Re: String manipulation
Hello Eric,
There is a limit to the number of string additions that can be carrier out on a single line of code.
Only two strings can be added together at any time, so Flowcode breaks the line up into a series of additions. This is limited to 4 terms on a single line.
The following line generates an error because there are 5 terms in it:
Timestring = H + ":" + M + ":" + S
It can be replaced with the following two lines:
Timestring = H + ":" + M + ":"
Timestring = Timestring + S
These two lines can be contained in a single Flowcode block.
There is a limit to the number of string additions that can be carrier out on a single line of code.
Only two strings can be added together at any time, so Flowcode breaks the line up into a series of additions. This is limited to 4 terms on a single line.
The following line generates an error because there are 5 terms in it:
Timestring = H + ":" + M + ":" + S
It can be replaced with the following two lines:
Timestring = H + ":" + M + ":"
Timestring = Timestring + S
These two lines can be contained in a single Flowcode block.
Re: String manipulation
Thanks Sean.
This is clear now.
Maybe interesting to add this info into the string help topic ?
Regards.
This is clear now.
Maybe interesting to add this info into the string help topic ?

Regards.