07-08-2006 06:33 AM
07-08-2006 07:55 AM
07-10-2006 02:32 AM
Hello Jacky,
as Martin already suggested you should use the function Scan. The Scan function is used to break a string up into one or more strings, integers, doubles, ... The Fmt fuction does exact the opposite, and is used to create a string from several strings, integers, doubles, ...
Scan and Fmt use modifiers to let the user describe details about the goal and/or target arguments. The modifier you should use is [x], which is the 'discard terminator' modifier. Since you want to break up the string into doubles, use %f as the target format specifier.
I do not know how many doubles you have in your string. Suppose there are ten, then the function looks like this: Scan (string, "%s>%10f[x]", A); Since the source is a string, you can leave out the %s argument and just write Scan (string, "%10f[x]", A); You should note that the function will also expect a comma after the 10th double. If this is not the case, you should treat the 10th double seperately and write Scan (string, "%9f[x]%f", A, &A[9]);
Like Martin, I suggest you take a good look at the Scanning Functions topic in CVI Help. It's not too easy I have to admit, but you really can do a lot of things with it if you understand how it works.
Success,
Wim