Get rid of text prompt in graphics mode

Discussions related to graphics (2D and 3D), animation and games programming
ziggi
Posts: 1
Joined: Mon 31 May 2021, 08:10

Get rid of text prompt in graphics mode

Post by ziggi »

Hi!

I try to use BBC Basic to offer my 13 years old daughter some programming fundamentals, so I try to illustrate simple programmatic drawing. I need to get rid of the text prompt in the graphics mode. Any idea? I do not mean cursor (the underscore) only but also it's prompt (the "bracket"):

Image

Thanks ahead of your feedback!
DDRM

Re: Get rid of text prompt in graphics mode

Post by DDRM »

Hi Ziggy,

The command line prompt (which is what you are seeing) appears when the program terminates. I suspect it's a feature of Windows (or whatever operating system you are using, if you are using BBC-SDL). I can't see any way in the BB4W manual to hide/change it...

...but you can prevent it appearing by preventing the program terminating. If I want to pause a program, I often include the line

Code: Select all

q$=GET$
which waits for a key to be pressed on the keyboard (and stores it in q$). You don't necessarily need to do anything with it (though of course you could check it, and either quit or re-run the program, perhaps with different parameters:

Code: Select all

MODE 21: REM Sets up an 800 x 600 window, which is 1600 x 1200 BBC graphics units (don't ask, it's ancient history!)
OFF
ORIGIN 800,600 :REM Set graphics origin to the centre of the window
angle = 0
REPEAT
    LINE 0,0,600*COS(RAD(angle)),600*SIN(RAD(angle)) :REM Can USE COSRAD(angle) and SINRAD(angle), but less clear for teaching
    q$=GET$
    angle += 10
UNTIL q$="q" OR q$="Q"
Note that this will still give the prompt at the end, when you press Q (or q). If you want the window to close without going to a command prompt, you can finish the program with QUIT instead of END (having neither defaults to END).

Best wishes,

D