Hi,

Having problems with using serout2 and sending a segment of a string need some advice please:


pointer=9
length=10
Pointer and length setup as var byte.
xyz var byte[70]


str xyz[9]\10 'this works fine starts ie from pointer position 9 sends 10 characters of XYZ.

But replacing the pointer with a variable doesn't work ie:
str xyz[pointer]\length 'appears to displays the first character correctly and the balance garbled data
or
str xyz[pointer]\10 'appears to displays the first character correctly and the balance garbled data

str xyz[pointer]\1 'this displays the first character correctly

Temporary got around the problem by using for/next but it's ugly ie:

for z= 1 to length
str xyz[pointer]\z
next z


Any advice appreciated!

Thanks,

Rob.