Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:11 21 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM 4.7b23 CLS

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1992
Posted: 08:37pm 10 Aug 2015
Copy link to clipboard 
Print this post

When I use the CLS (colour) command the screen clears but the background will not change to the colour specified in the command. I'm sure it worked in a previous version.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10281
Posted: 09:06pm 10 Aug 2015
Copy link to clipboard 
Print this post

It definitely works:

are you using the correct syntax?

CLS RGB(RED)

if you do "CLS RED" then RED is just a newly created variable which will be initialised to 0 (black) - problem avoided if you always use OPTION EXPLICIT

You can also set the default colours with:

COLOUR RGB(RED),RGB(BLUE)

this then means CLS will write a blue background and other drawing functions (e.g. BOX) will default to red; text will be red on blue.Edited by matherp 2015-08-12
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1992
Posted: 11:28pm 10 Aug 2015
Copy link to clipboard 
Print this post

Thanks I was using CLS Red
Silly me I used the correct syntax before
Paul.

Edit..... Why didn't I get a syntax error, that would have pushed me in the right direction.
PaulEdited by palcal 2015-08-12
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025