Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 02:48:10 +0000



Post From: do standard variables reset to zero every time a study functions loops?

[2023-03-16 12:08:35]
Berliner JFK - Posts: 45
Hello Tony and thank you.

I did not find the terms public and static variables in the ACSIL documentation, but after doing some research on C++, it seems like public is the same as a global variable in ACSIL, while static is the same as a persistent variable.

But your statement about standard variables is clear, i.e. that they are reset to zero every time the function returns. Thanks again.

I believe the problem is solved now. I had a standard, non-persistent variable which was retaining it's value after my study function returned. The reason was because it was in scope, as explained by @ondafringe in a different post, and I solved the issue by explicitly resetting it to zero.

Thanks again to everyone for the help!
Date Time Of Last Edit: 2023-03-16 15:24:19