LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Expression Node Bug?

Solved!
Go to solution

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. Smiley Frustrated

0 Kudos
Message 1 of 4
(2,919 Views)
Solution
Accepted by topic author BMajor7

Read the help:

 

Note  The Formula Node accepts only the period (.) as a decimal separator. The node does not recognize localized decimal separators.


0 Kudos
Message 2 of 4
(2,913 Views)

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.

0 Kudos
Message 3 of 4
(2,901 Views)

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#?

 

0 Kudos
Message 4 of 4
(2,896 Views)