Computer Science Canada Need help with colouring plz |
Author: | supersaiyan [ Sun Oct 08, 2006 11:38 am ] |
Post subject: | Need help with colouring plz |
I have Turing 4.0.5--Windows Version really simple question i am a beginer, started using turing yesterday here's the question about colouring i.e when i use this colourback (10) put "HI" when i run it, background for whole line is green like this i just want the background for only HI, now the whole line plz tell me how to do it Thanks [/quote] |
Author: | Clayton [ Sun Oct 08, 2006 12:31 pm ] |
Post subject: | |
well, from what i remember the only you may be able to do that is to actually draw a box behind the words, because what colorback does is redesignate what the background color of your screen is (in your case green), and when you put something, it clears that line then puts the output, hence the green line. To do this you may want to look into default sizes of font (check in your options menu, it should be in there) and create a procedure to have just the background behind your letters be colored ![]() If you want just the actual writing to be colored, then use the color () procedure, which changes the color of your output (when using put) to the specified color |
Author: | Tony [ Sun Oct 08, 2006 12:36 pm ] | ||
Post subject: | |||
put includes a new-line character by default, and that clears the rest of the line, colouring it in the process. a little hack that I would imagine would work is:
the .. on the 2nd line forces the output to continue on the same line. This is where you switch back to the other colour, and fill the rest of the line with that. |
Author: | NikG [ Sun Oct 08, 2006 5:36 pm ] | ||
Post subject: | |||
Tony wrote: a little hack that I would imagine would work is:
Weirdly enough, if you remove the last 2 lines (so you're left only with colourback(green) and put "Hi"..), this works too.
For any input after that, you could then use locate. |