Wrong use of "Scan From String" function in a while loop? 
Author Message
 Wrong use of "Scan From String" function in a while loop?


I've got a "Scan From String" function inside a while loop. On the
first iteration it converts correctly the number passed by the input
string (for example 4) But on the second one it has only spaces (one
or more \s) as input string.
I expected to obtain a zero as output (as it does always that it can
not make any conversions, as I am supposed to) but indeed, i subtracts
1 from the previous number (according to the number indicated as
example I would obtain a 3 as output)

What's wrong with this?
Does the function fails on this case?

The rest of the diagram o the VI is expected to manage a 0 on that
situation, like others in which the conversion is not made.


Tue, 28 Sep 2004 02:23:53 GMT  
 Wrong use of "Scan From String" function in a while loop?
I tried reproducing your problem but haven't had any luck.  If you
attach your code, I can take a look at it for you.

Wed, 29 Sep 2004 03:36:01 GMT  
 Wrong use of "Scan From String" function in a while loop?
I understand your concern about converting code frome one version to
another, still it's not as bad a process as you might imagine. The
main thing is to resist the temptation to try and convert your entire
application in one go.

I'm not sure what you mean by "errors due to conversion" as the
conversion itself shouldn't cause errors.

How big is your application?


Thu, 30 Sep 2004 11:48:47 GMT  
 Wrong use of "Scan From String" function in a while loop?
Thanks Matt,

I think it will help very well.

I wish I could upgrade as you both said. Surely, with a little
pattience it won't be as bad. Even though, despite my desires to
change, I still continue to have my work done with LV5 which I expect
to have soon at home, forgetting LV4 at last!

Sun, 03 Oct 2004 01:34:27 GMT  
 [ 4 post ] 

 Relevant Pages 

1. scan string for "returns"

2. binary scan: "character string"?

3. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

4. proto-PEP: interpolated strings using ""if

5. Using "with function"

6. Call x"91" using FUNCTION-35

7. Using "C" functions in lisp

8. Characters "?", "?", "ΓΌ" shown in wrong font

9. string match fails for strings containing "["

10. clock scan "this" modifier

11. scan for "words" in Reference Manual

12. incorrect return value for "scan" command


Powered by phpBB® Forum Software