Question about scope and recycling of vars
Hi,
I have a load of code and variables that are used in an interrupt routine. To make them accessible to code outside I'm using declaring them as Public. But what happens to the contents of the other variables in the sub? Are they getting reused?
BTW the vars are declared outside the event handler sub because inside is an issue.
I ask as I'm getting a flag corrupted. Its not happening on the 18 series pic in a VSM. The boolean var was inside a structure, I moved it outside and it was fine.
Thanks
Tim
I have a load of code and variables that are used in an interrupt routine. To make them accessible to code outside I'm using declaring them as Public. But what happens to the contents of the other variables in the sub? Are they getting reused?
BTW the vars are declared outside the event handler sub because inside is an issue.
I ask as I'm getting a flag corrupted. Its not happening on the 18 series pic in a VSM. The boolean var was inside a structure, I moved it outside and it was fine.
Thanks
Tim