The variables in a task look like automatics in a c function. In c the initial state for automatics is unknown. Is this also true of task scope variables in xC, or are they guaranteed to be zero like file scope or global variable would be in c?
Thanks!
xC Task scope variable initial value
-
- Active Member
- Posts: 47
- Joined: Wed Feb 05, 2014 1:25 am
-
- Experienced Member
- Posts: 104
- Joined: Fri Dec 11, 2009 8:29 pm
They have an undefined initial value. There are no "tasks" as such in the language. You just have functions like in C. We tend to call them tasks if their main use case is to be called to run in parallel via a 'par' statement.
-
- Active Member
- Posts: 47
- Joined: Wed Feb 05, 2014 1:25 am
Thank you! Also your description of tasks is helpful, I had assumed that par{} triggered special code generation for the function. I have lots to learn...