Shop OBEX P1 Docs P2 Docs Learn Events
strings usage — Parallax Forums

strings usage

El PaisaEl Paisa Posts: 375
edited 2006-05-20 15:40 in Propeller 1
Could any one give me a hand in how to handle strings?
How to convert variables or constants into strings and viceversa?
How to use LEFT, RIGHT, MID, CHR$.
The manual (chapter 4) is not too specific into this.
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 15:40
    There's little in the manual because there's very little built into Spin for string manipulation. You can declare constant strings and the STRING function essentially declares a constant string and provides its address. You can compare two strings given the address of the first byte and you can get the length of a null-terminated string. Strings are just arrays of bytes. That's all. The intention is that someone will write a string object with the functions that most people take for granted and contribute it to the growing library. Currently, the display objects (VGA, TV) have methods (functions) that convert numbers into strings on-the-fly for display purposes. You can use them for examples.
Sign In or Register to comment.