07-20-2010 10:12 AM
I have a sub sequence with the following expression in the cleanup section:
RunState.SequenceFailed ? (Locals.SeqStatus = "Failed") : (Locals.SeqStatus = "Passed"), FileGlobals.RptTestData[0][Parameters.SumRptStep] = "Lower Band Edge ("+Str( Parameters.LowFreqMHz)+"/"+Str( Parameters.HighFreqMHz)+"MHz)", FileGlobals.RptTestData[1][Parameters.SumRptStep] = Locals.SeqStatus
Locals.SeqStatus appears to exist only as a temporary variable for this sequence of assignments. It is set in the first and used in the last. With some languages the order execution of comma separated statements is not guaranteed. So I am wondering if this is safe programming or should it be 2 separate TS expressions, i.e. another sequence step
thanx,
jvh
07-20-2010 10:44 AM
TestStand follows the same rules as C/C++. My nearest C manual (and the TS source) says the comma operator evaluates the first argument THEN the second, so that should be fine.