String Concatenation?
Archiver
Posts: 46,084
Greetings. Does anyone know a good way to combine characters into
string arrays on a BS2? The nuts-n-bolts way (i.e. A(0)="S" A(1)="T"
A(2)="R" A(3)=I....etc.) works, but it's hardly elegant. I need to
do
this to format numeric variables into special SEROUT strings. Is
there a codespace-efficient shortcut I'm missing?
Thanx.
string arrays on a BS2? The nuts-n-bolts way (i.e. A(0)="S" A(1)="T"
A(2)="R" A(3)=I....etc.) works, but it's hardly elegant. I need to
do
this to format numeric variables into special SEROUT strings. Is
there a codespace-efficient shortcut I'm missing?
Thanx.
Comments
"X:0032, Y:0019")...
SEROUT pin, baud, [noparse][[/noparse]"X:", DEC4 xVal, ", Y:", DEC4 yVal]
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: com120 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Sh10wFcWCwVS9ez2ReFqUki-p44BkWAhvl5dWxrGbIOObit5TV5GyD_EGg_-DDMjX4e9IvG9ncObdRxKvxNoyA]toad_koppel@y...[/url
Sent: Monday, May 31, 2004 2:31 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] String Concatenation?
Greetings. Does anyone know a good way to combine characters into
string arrays on a BS2? The nuts-n-bolts way (i.e. A(0)="S" A(1)="T"
A(2)="R" A(3)=I....etc.) works, but it's hardly elegant. I need to do
this to format numeric variables into special SEROUT strings. Is
there a codespace-efficient shortcut I'm missing?
Thanx.
wrote:
> Can you not do it on-the-fly in SEROUT? Like this (you want to send
> "X:0032, Y:0019")...
>
Hmmmm...apparently I can. Thanx, Jon.