Combining strings
I've scoured the manual, tried and tried. with no luck. Can some one tell me the command or how to combing strings.
I want to read some variables, and combine them as one long string. I was able to do this in Pbasic (going from memory) by: x = "hello_" + "world"
but if I do that with spin it seems to add the numeric values of the 2 and I only get weird symbols.
do I need to write each variable to memory and then read the whole memory area as one string?
I'm stuck. any help would be appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
I want to read some variables, and combine them as one long string. I was able to do this in Pbasic (going from memory) by: x = "hello_" + "world"
but if I do that with spin it seems to add the numeric values of the 2 and I only get weird symbols.
do I need to write each variable to memory and then read the whole memory area as one string?
I'm stuck. any help would be appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Post Edited (Dgswaner) : 4/10/2008 4:39:36 AM GMT
propeller.wikispaces.com/Strings
Example call:
var byte buffer[noparse][[/noparse]80] pub concatStr(@buffer,string("hiya-"),string("toots"))Concatenation routine
pub concatStr(dest,s1,s2) '' Concatenates two strings and stores the result in 'dest' bytemove(dest,s1,strsize(s1)) bytemove(dest+strsize(s1),s2,strsize(s2))-Chuck-