serout using "#" for ascii behaving strangely!

maitchy

Member
I get strange characters sent out the serial line for #b1 or #w1 etc, but not #123. The characters tend to be over 128 (e.g. accented o), and the following carriage return and line feed are corrupted too. This is with a 14M and version 5.1.5 editor. The problem is with serout, it looks like sertxd is okay.

Example:
serout 0,N2400,("This works: ",#123,cr,lf)
pause 300
let b1 = 123
serout 0,N2400,("But not this: ",#b1,cr,lf)
w1 = 2
serout 0,N2400,("nor this: ",#w1)
serout 0,N2400,(cr,lf)

Gives:

This works: 123
But not this: tU†nor this: õÃ

(It is surprisingly hard to copy received characters from the serial terminal window, but hopefully seeing the actual characters may be a clue. It's not like they are getting the MSB set or it is choking on large numbers).

 

Technical

Technical Support
Staff member
This is a known firmware bug with # that was fixed in 9.C - if you have the older 9.A or 9.B you could use the sertxd command instead.
 
Top