Shop OBEX P1 Docs P2 Docs Learn Events
vga_text.spin / vga_text_demo.spin — Parallax Forums

vga_text.spin / vga_text_demo.spin

Richard S.Richard S. Posts: 70
edited 2007-02-08 17:01 in Propeller 1
Question:· why am I unable to compile a program using IDE if I have '$00' or color '$C,0' in a

text.str(string($00,$A,12,$B,14,$C,0,"print this",13,13)) command?

The IDE gives me an error that I cannot use $00 or use the color palette selection of 0.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-08 15:17
    Because the zero value is used to indicate the end of a string, it is not allowed in the string() construction. You can define this string in a DAT section and pass its address to text.str or you can split the string into pieces and use .out for the zero bytes like:
    text.out(0)
    text.str(string($A,12,$B,14,$C))
    text.out(0)
    text.str(string("print this",13,13))
    
    
  • Richard S.Richard S. Posts: 70
    edited 2007-02-08 17:01
    Mike...

    Ahha...the light goes on. Thanx!
Sign In or Register to comment.