assign a word variable to a byte variable in SX/B
Hi all,
just a "stupid" question. I have defined 2 variables, one as byte, one as word, like
v1· var byte
v2· var word
After some calculations, v2 contains a value 0<=v2<=255
Now, I like to assign the content of v2 to v1.
But the line
v1=v2 produces a SX/B error 8 "Invalide Parameter" ....
What am I missing?
Thanks in advance
Gerry
·
just a "stupid" question. I have defined 2 variables, one as byte, one as word, like
v1· var byte
v2· var word
After some calculations, v2 contains a value 0<=v2<=255
Now, I like to assign the content of v2 to v1.
But the line
v1=v2 produces a SX/B error 8 "Invalide Parameter" ....
What am I missing?
Thanks in advance
Gerry
·
Comments
Use "v1 = v2_LSB".
All word variables automatically create two aliases "name_MSB" and "name_LSB".
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
thanks a bunch !!!!!!!!
Gerry