02-28-2013 03:09 AM
Hi,
could anyone (using semicolon decimal separator) please try this expression in the expression node:
100*(1+x*0,003908+pow(x,2)*(-5,7746*pow(10,-7)))
The error message is: Missing right parenthesis (Error is marked by a '#' character: "100*(1+x*0,003908#+pow(x,2)*(-5,7746*pow")
I am using the semicolon decimal separator (this is germany).
Funny facts:
- using any other number instead of 0,003908 works
- replacing the decimal separator with a dot (.) makes it work, too - even if the second factor (5,7746) is left with the semicolon
I am using LabVIEW 2011, BTW.
Not a big issue. I am writing my applications in C# anyway after too many real LV issues. Just wanted a little test panel and thought I give LabVIEW another chance.
Solved! Go to Solution.
02-28-2013 03:22 AM - edited 02-28-2013 03:22 AM
Read the help:
Note The Formula Node accepts only the period (.) as a decimal separator. The node does not recognize localized decimal separators. |
02-28-2013 04:09 AM
So semicolon leads to unexpected behavior? It might work or might not. Might use the value before or after it or not at all. Why does it run at all then and not throw an exception or cause a compiler error?
Why do e.g. double constants use localized decimal separator but not expression nodes? That is too inconsistant for me.
Hell, that language is a waste of time - every time I use it!
But thank you anyway.
02-28-2013 04:18 AM
In formula nodes the comma (not semicolon) has a different meaning, it separates arguments. E.g. in pow(a,b). Now when you use a comma as decimal separator how is the parser supposed to know what is a decimal separator and what is an argument separator? E.g. you could have pow(2,5,7). Would that be 2.5^7 or 2^5.7?
I agree a syntax error would be best.
On another note: what decimal separator do you use in C#?