SX/B: WATCH an array element?
![Paul](https://forums.parallax.com/uploads/userpics/385/nGFWB2E6BD0OA.jpg)
I'm trying to WATCH an array element (in SX/B 1.51) defined as follows:
ADC··var byte(8)
The 'new'·format·didn't work:
·Watch ADC(0)
It 'compiled' to: ADC+0,8,UDEC which reported an error on the "Invalid type '8'
This didn't work either:
·WATCH ADC(0),8,UDEC
It has an "invalid type ','
This·compiles but I suspect it is only looking at ADC(0):
·watch ADC,8,UDEC
How·would I WATCH ADC(1) thru ADC(7)?
Thanks,
Paul
·
ADC··var byte(8)
The 'new'·format·didn't work:
·Watch ADC(0)
It 'compiled' to: ADC+0,8,UDEC which reported an error on the "Invalid type '8'
This didn't work either:
·WATCH ADC(0),8,UDEC
It has an "invalid type ','
This·compiles but I suspect it is only looking at ADC(0):
·watch ADC,8,UDEC
How·would I WATCH ADC(1) thru ADC(7)?
Thanks,
Paul
·
Comments
It seems the WATCH command in SASM doesn't like the "+" sign.
You can make it work by creating an alias to the individual elements, and watch them.
Or if you want to see the array as a string you can use WATCH ADC,8,FSTR in this case the "8" is the number of elements in the array.
I will look into correcting this for the next release...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
·
Paul