Millisecond Forums

Issue with Expressions

https://forums.millisecond.com/Topic26188.aspx

By vlamarche - 12/14/2018

Hello

I keep getting the following error message for the attached script:

"Expression 'expression.m3' is invalid. Expression contains an unknown element or property name."

However, there doesn't appear to be anything different with that expression than any of the others in the text. If someone has an idea as to why I'm getting that error message I would appreciate it. Syntax attached.

Many thanks
Veronica

By Dave - 12/14/2018

vlamarche - Friday, December 14, 2018
Hello

I keep getting the following error message for the attached script:

"Expression 'expression.m3' is invalid. Expression contains an unknown element or property name."

However, there doesn't appear to be anything different with that expression than any of the others in the text. If someone has an idea as to why I'm getting that error message I would appreciate it. Syntax attached.

Many thanks
Veronica


The error is not about expressions.m3,

<expressions>
/ m1 = values.sum1 / values.n1
/ m2 = values.sum2 / values.n2
/ m3 = values.sum3 / values.n3
/ m4 = values.sum4 / values.n4
...
<expressions>

but alerts you to something called "expression.m3" (no "s") that Inquisit doesn't know about. And Inquisit is correct, you have a number of mistakes in your <expressions>:

<expressions>
...
/ sd = sqrt((((values.n1 - 1) * (expressions.sd1 * expressions.sd1) + (values.n2 - 1) * (expressions.sd2 * expressions.sd2) +
     (values.n3 - 1) * (expressions.sd3 * expressions.sd3) + (values.n4 - 1) * (expressions.sd4 * expressions.sd4)) +
     ((values.n1 + values.n2 + values.n3 + values.n4) * ((expressions.m1 - expressions.m2 - expression.m3 - expression.m4) * (expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4)) / 8) ) / (values.n1 + values.n2 + values.n3 + values.n4 - 1) )
...
</expressions>

Those ought to read

<expressions>
...
/ sd = sqrt((((values.n1 - 1) * (expressions.sd1 * expressions.sd1) + (values.n2 - 1) * (expressions.sd2 * expressions.sd2) +
     (values.n3 - 1) * (expressions.sd3 * expressions.sd3) + (values.n4 - 1) * (expressions.sd4 * expressions.sd4)) +
     ((values.n1 + values.n2 + values.n3 + values.n4) * ((expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4) * (expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4)) / 8) ) / (values.n1 + values.n2 + values.n3 + values.n4 - 1) )
...
</expressions>

By vlamarche - 12/14/2018

Dave - Friday, December 14, 2018
vlamarche - Friday, December 14, 2018
Hello

I keep getting the following error message for the attached script:

"Expression 'expression.m3' is invalid. Expression contains an unknown element or property name."

However, there doesn't appear to be anything different with that expression than any of the others in the text. If someone has an idea as to why I'm getting that error message I would appreciate it. Syntax attached.

Many thanks
Veronica


The error is not about expressions.m3,

<expressions>
/ m1 = values.sum1 / values.n1
/ m2 = values.sum2 / values.n2
/ m3 = values.sum3 / values.n3
/ m4 = values.sum4 / values.n4
...
<expressions>

but alerts you to something called "expression.m3" (no "s") that Inquisit doesn't know about. And Inquisit is correct, you have a number of mistakes in your <expressions>:

<expressions>
...
/ sd = sqrt((((values.n1 - 1) * (expressions.sd1 * expressions.sd1) + (values.n2 - 1) * (expressions.sd2 * expressions.sd2) +
     (values.n3 - 1) * (expressions.sd3 * expressions.sd3) + (values.n4 - 1) * (expressions.sd4 * expressions.sd4)) +
     ((values.n1 + values.n2 + values.n3 + values.n4) * ((expressions.m1 - expressions.m2 - expression.m3 - expression.m4) * (expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4)) / 8) ) / (values.n1 + values.n2 + values.n3 + values.n4 - 1) )
...
</expressions>

Those ought to read

<expressions>
...
/ sd = sqrt((((values.n1 - 1) * (expressions.sd1 * expressions.sd1) + (values.n2 - 1) * (expressions.sd2 * expressions.sd2) +
     (values.n3 - 1) * (expressions.sd3 * expressions.sd3) + (values.n4 - 1) * (expressions.sd4 * expressions.sd4)) +
     ((values.n1 + values.n2 + values.n3 + values.n4) * ((expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4) * (expressions.m1 - expressions.m2 - expressions.m3 - expressions.m4)) / 8) ) / (values.n1 + values.n2 + values.n3 + values.n4 - 1) )
...
</expressions>


Fantastic, many thanks!