01-26-2018 08:29 AM
Hi,
whats wrong with this expression?
(( Locals.ChannelA.Info.Input.ID.Name != "" ) && ( Locals.ChannelA.Info.Output.ID.Name != "" )) ? ( Locals.ChannelA.Limits = Locals.Limits.LimitsList[ Val( Locals.Test.Current.ChannelA.LimitName ) ] )
The error messages says Unexpected token: "?". Basically I'd just like to implement an IF structure. The expression is in expression tab of a statement type step.
Must be something mega obvious...
Thanks,
1984
Solved! Go to Solution.
01-26-2018 08:33 AM - edited 01-26-2018 08:34 AM
ANSI C defines a boolean if clause as <Boolean Criteria>?<TRUE>:<FALSE>.
Looking at your expression, there is the complete <FALSE> branch missing.
EDIT: I stated the part with ANSI C because TS is implementing the same syntax
01-26-2018 08:37 AM - edited 01-26-2018 08:37 AM
I see... is there a "do nothing" command in TestStand? Or should I just put simply a False constant to the false branch?
01-26-2018 10:58 AM
False should work fine, but my favorite is to use the keyword Nothing
01-26-2018 11:13 AM
Thanks! All clear now.