Hi,
That's weird.... I don't think it matters (or should matter) where you put the variable declaration. What if you put the declaration at the top but assign a value to it right before the HSEROUT (or SHIFTOUT) statement?
Are you using any aliases or any Arrays? There are no boundary checks on arrays in PBP so if you are using an array and accidently write "outside of it" you will write to variable(s) adjacent to the array.
To me it sounds as if there's something in your code that write 16 to the third byte of your LONG, is it allways 16 by the way?
/Henrik.
Bookmarks