How to pass zero value parameters to the VGA TEXT library object
robotbuilder
Posts: 3
I am using the VGA TEXT object to display 15 lines of various colours of text on a VGA monitor. When I try to reset the text colour back to value zero for a section of text using text.str (string($C, 0,"text")) or when trying to reset the text position pointer back to a point half way across the top line using text.str (string( $A,16, $B,0)) I get an error message that I cannot pass a value of zero. I have tried using a constant set to zero but get the same messgae. I have also tried using a variable but it says that it is expecting a number, constant or bracket.
Is there an easy way round this or do I need to hack the library module to not use line 0 or colour 0?
Is there an easy way round this or do I need to hack the library module to not use line 0 or colour 0?
Comments
-Phil
I replaced the previous lines with:
text.out($0A)
text.out(16)
text.out($0B)
text.out(0)
text.out($0C)
text.out(0)
and it works just fine
Don't know if there is a more compact way of coding this in spin
Cheers
Cheers