04-27-2026 09:59 AM
Hi,
I have this sequence file in which, for customizing the report, a number (the index of the paragraph) is passed by reference as parameter between the called sequence and the caller one.
In the Called Sequence I have a statement step to control when to increase this index:
StationGlobals.Debug ? Nothing : (Locals.TempIDX +=1)
The issue is: on the first call everything seems fine, TempIDX stays zero after the step; on the second call of the Called Sequence when the statement step is performed I found that TempIDX is increased even if the Boolean Debug is still True.
What am I missing?
Thank you for the help!
Best Regards,
Zuc
04-28-2026 12:26 AM
Are you using multi-thrading?
Global Variables are prone to RaceConditons
04-28-2026 01:33 AM
Hi Oli_Wachno,
i hoped it was something like that, but no. Always only one thread. Since the called sequence (the o ne wit the expression) is inside a for each in the caller, it seems that at the second loop the expression is executed without evaluation.
TestStand version 2022
Best Regards,
Zuc
05-05-2026 06:10 PM
I tried this in TS2019 and did not see a problem. I can try TS2021 and TS2025 tomorrow.
05-08-2026 07:06 AM
Hi ee-jallen,
sorry my mistake i havne not updated the issue! there is no problem in the expression it was multiple nested call in the sequence that created the problem!
Thank you for the patience and the help!
Best Regards,
Zuc