PUT command with a constat value
SamTheMan
Posts: 43
Dear Bean,
I tried this code, but I had a problem with it.
the X array gets filled up with 5s instead of the first 5 locations only
please note the compiler did not complain
Thank you for your great effort.
p con 10
x var byte(16)
y var byte(16)
a var byte (16)
i var byte
for i=0 to 15
y(i)=5
next
put a,y(0) TO y(p)· 'OK
put x,y(0) TO y(p-5)· ' DOES NOT work right and the compiler did not complain
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I tried this code, but I had a problem with it.
the X array gets filled up with 5s instead of the first 5 locations only
please note the compiler did not complain
Thank you for your great effort.
p con 10
x var byte(16)
y var byte(16)
a var byte (16)
i var byte
for i=0 to 15
y(i)=5
next
put a,y(0) TO y(p)· 'OK
put x,y(0) TO y(p-5)· ' DOES NOT work right and the compiler did not complain
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
You can only use math in an assignment command (even constant math).
So the y(p-5) should have thrown an error. I'll look into it.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·