Hi,
I have just started to work/play with Flowcode 3, but I am having some difficulty with strings.
Can anyone point me to a document or something where I can get a couple of examples? I already searched this forum and downloaded all the tutorials.
I want to create a basic function that consist out of a loop. With each loop the variable "count" is increased, and the value of "count" is placed in another string variable called "mystring[6]".
I am trying to do this routine inside the loop this way:
IN A CALCULATION BOX:
count = count + 1
IN A STRING MANIPULATION BOX:
mystring[count] = ToString%(count)
Thanks for your help.
Regards
Jan
String Manipulation
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
- Contact:
Jan,
If you look at the help file then the link "string manipulation functions" is the bit you need.
Unfortunately the function you seem to need here has typo in the helpfile as it reads
------------------
Mid$(string, start, size)
Retrieves a substring from the string starting at position start of size characters.
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.
TestStr = Left$(Str1, 2, 3)
TestStr is now "llo"
------------------
The last part should I think read
TestStr = Mid$(Str1, 2, 3)
Str1 in the examples is "Hello"
So for your loop you will need something like
mystring[count] = Mid$(FromString,count,X)
where X is the number of charactyers you want to abstract
Hope this helps
If you look at the help file then the link "string manipulation functions" is the bit you need.
Unfortunately the function you seem to need here has typo in the helpfile as it reads
------------------
Mid$(string, start, size)
Retrieves a substring from the string starting at position start of size characters.
If the length of the string used to store the result is less than size of the substring returned then any extra characters are lost.
TestStr = Left$(Str1, 2, 3)
TestStr is now "llo"
------------------
The last part should I think read
TestStr = Mid$(Str1, 2, 3)
Str1 in the examples is "Hello"
So for your loop you will need something like
mystring[count] = Mid$(FromString,count,X)
where X is the number of charactyers you want to abstract
Hope this helps
Go with the Flow.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Hello
The convert number to string function should work
IN A STRING MANIPULATION BOX:
: note the $ symbol and not the % symbol you had previously.
: Also note that the count variable cannot be placed into a string with an index as the ASCII representation of the variable may be more then one character.
The convert number to string function should work
IN A STRING MANIPULATION BOX:
Code: Select all
mystring = ToString$(count)
: Also note that the count variable cannot be placed into a string with an index as the ASCII representation of the variable may be more then one character.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel