Page 1 of 1

Check is task exists in NXC

Posted: 17 Jul 2012, 08:37
by bungeshea
Is there a way to check is a task, function or variable exists in NXC? I know that in PHP you can use isset() to check if a variable exists and function_exists() to do the same for a function, but is there a way to do that in NXC? I am specifically wanting to check if a task exists.

Re: Check is task exists in NXC

Posted: 17 Jul 2012, 10:01
by HaWe
if a task exists or if it's alive?

Re: Check is task exists in NXC

Posted: 17 Jul 2012, 10:07
by spillerrec
No, there is no such thing. NXC is a static typed language, if a task, function or variable do not exist, it will not compile. PHP is dynamically typed, so it is not always the case.

I'm not quite sure what you are trying to do. You might be able to do something with conditional compilation using the #if or #ifdef of the preprocessor, but this is at compile time and not runtime like isset().