Hi!
I am new to CONTROL programming. From other coding languages such as C and C++ I know key words like "static" or "global".
I have following code fragment, and the Script Editor dispays a syntax error at the line, where the declaration of the static variable is.
// Work function for dpConnects
void CheckInterlock(string device1,int state_device1, string device2, int state_device2, string device3, int state_device3)
{
DebugN("++++++ ENTER CheckInterlock ++++++++");
// Extract the Technological Address from the dp string
dyn_string device1_split, device2_split, device3_split, TA1_split, TA2_split, TA3_split;
string TA1, TA2, TA3, message;
bool trigger;
static int devicelock_count = 0;
Can anyone explain to me whats wrong, and how to solve this?
Thanks!
Usage of key words like static and global
- michael.danzer
- Posts:13
- Joined: Thu Aug 03, 2017 11:13 am
Usage of key words like static and global
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Usage of key words like static and global
The static keyword is not available in CTRL. Therefore you get a syntax error.
Only when using CTRL++ you can use the keyword.
Best Regards
Leopold Knipp
Senior Support Specialist
Only when using CTRL++ you can use the keyword.
Best Regards
Leopold Knipp
Senior Support Specialist