| Author |
Message |
snovotill
Joined: Feb 8, 2013 Posts: 80
|
Posted: Jan 2, 2014 11:55 PM Post subject: ExpressionEvaluator - remembered outputs and inputs |
|
Hi Jarek, I've been able to use a single remembered output ie LastOut scenario like this: In4==0? In1 : Out1+(Out1*(In2-In3)/1000) But if I define Out1 first with Out1=... then I lose the ability to do the above, which means that I can't really implement a LastIn feature. Is there any known workaround, or do I need to use the Delay element? Thanks kindly, Stepan |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Jan 3, 2014 12:08 AM Post subject: |
|
1. It is possible to use LastInX variable to get the last input value.
2. I don't quite understand what you are trying to do. If you don't add \"Out1=...\" in the expression, then it is added there later automatically, so I don't see how it changes anything.
3. It is possible to use higher output variables which are not connected, for example: Out3=Out1+(Out1*(In2-In3)/1000); Out1=In4==0? In1 : Out3; |
|
 |
snovotill
Joined: Feb 8, 2013 Posts: 80
|
Posted: Jan 3, 2014 2:12 AM Post subject: |
|
Now that's handy =) Order of precedence was messing me up.
Look... this expression uses remembered Out1 in the first half: Out2=Out1+2;Out1=In1 But this one does not because the first section overwrites Out1: Out1=In1;Out2=Out1+2 But we can save Out1 into Out3 before executing the expression: Out3=Out1;Out1=Out1+2;Out2=Out3*2
Is order of precedence guaranteed to be left to right?
I used to think that everything was possible in Bioera and that everything was difficult. Now I know that the impossible is still difficult in BioEra, but BioEra is(does) everything! |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Jan 3, 2014 2:29 AM Post subject: |
|
Yes, order is guaranteed from left to right for expressions separated by semicolons.
|
|