Discussion:
BBC BASIC - 'MODE MODE'
(too old to reply)
c***@gmail.com
2019-12-05 14:16:20 UTC
Permalink
Sorry that the old Alzheimers seems to be taking a grip!

Can some kind soul please remind me what BASIC 'MODE MODE' at the start of a program actually does?
I understand MODE 28, MODE 15 etc, but don't recall what the second 'MODE' in 'MODE MODE' actually does. (I have been sent a BBC BASIC program in which the first instruction is 'MODE MODE')

So what MODE am I then in - what has the instruction actually done?

I used to know this, but used so long ago have actually forgotten. BASIC manual no help, nor PRM 5a.

George Pearce
Martin
2019-12-05 15:20:50 UTC
Permalink
On 05 Dec in article
Post by c***@gmail.com
Sorry that the old Alzheimers seems to be taking a grip!
Can some kind soul please remind me what BASIC 'MODE MODE' at the
start of a program actually does? I understand MODE 28, MODE 15
etc, but don't recall what the second 'MODE' in 'MODE MODE'
actually does. (I have been sent a BBC BASIC program in which the
first instruction is 'MODE MODE')
So what MODE am I then in - what has the instruction actually done?
I used to know this, but used so long ago have actually forgotten.
BASIC manual no help, nor PRM 5a.
Please see several replies to your original post, in archive-online.
Duplicate posts can confuse and irritate!
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
c***@gmail.com
2019-12-05 16:08:02 UTC
Permalink
Post by Martin
On 05 Dec in article
Post by c***@gmail.com
Sorry that the old Alzheimers seems to be taking a grip!
Can some kind soul please remind me what BASIC 'MODE MODE' at the
start of a program actually does? I understand MODE 28, MODE 15
etc, but don't recall what the second 'MODE' in 'MODE MODE'
actually does. (I have been sent a BBC BASIC program in which the
first instruction is 'MODE MODE')
So what MODE am I then in - what has the instruction actually done?
I used to know this, but used so long ago have actually forgotten.
BASIC manual no help, nor PRM 5a.
Please see several replies to your original post, in archive-online.
Duplicate posts can confuse and irritate!
Sorry - I thought this was a different forum from Archive O L!
Post by Martin
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
Richard Ashbery
2019-12-05 17:11:34 UTC
Permalink
In article
Post by c***@gmail.com
Sorry that the old Alzheimers seems to be taking a grip!
Can some kind soul please remind me what BASIC 'MODE MODE' at the
start of a program actually does? I understand MODE 28, MODE 15
etc, but don't recall what the second 'MODE' in 'MODE MODE'
actually does. (I have been sent a BBC BASIC program in which the
first instruction is 'MODE MODE')
So what MODE am I then in - what has the instruction actually done?
If 1920 x 1080 is your default mode then MODE MODE ensures it uses 1920
x 1080.

Richard
Matthew Phillips
2019-12-05 19:34:52 UTC
Permalink
Post by Richard Ashbery
In article
Post by c***@gmail.com
Sorry that the old Alzheimers seems to be taking a grip!
Can some kind soul please remind me what BASIC 'MODE MODE' at the
start of a program actually does? I understand MODE 28, MODE 15
etc, but don't recall what the second 'MODE' in 'MODE MODE'
actually does. (I have been sent a BBC BASIC program in which the
first instruction is 'MODE MODE')
So what MODE am I then in - what has the instruction actually done?
If 1920 x 1080 is your default mode then MODE MODE ensures it uses 1920
x 1080.
Not quite right. MODE used as a function returns the current mode number,
not the default mode.

MODE MODE

thus sets the mode to the current mode. What is the point of that? Well,
the screen gets cleared and various things will be reset (not sure what --
maybe graphics window, palette, etc.).
--
Matthew Phillips
Durham
druck
2019-12-09 16:19:39 UTC
Permalink
Post by Matthew Phillips
Not quite right. MODE used as a function returns the current mode number,
not the default mode.
MODE MODE
thus sets the mode to the current mode. What is the point of that? Well,
the screen gets cleared and various things will be reset (not sure what --
maybe graphics window, palette, etc.).
That's correct. If you want to run a non desktop program using the same
resolution and colour depth as the desktop, you might think a mode
change isn't necessary, but there are lot of things which the Wimp
changes when in the desktop, which need resetting to the defaults. The
MODE command resets these in one go, and to use the same resolution and
colour depth as the desktop, MODE MODE can be used. The Wimp will also
detect a mode change has occurred, and restore its settings on return to
the desktop.

But bear in mind RISC OS's legacy graphics system, which a non desktop
application will probably be using, is very dependent on colour depth
(256 colours work differently from 2 to 16, and more than 256 colours
needs newer APIs). So you might actually want to specify your mode
requirements explicitly.

---druck

f***@gmail.com
2019-12-05 17:37:43 UTC
Permalink
Sorry - I thought this was a different forum from Archive O L! 
Different forum, but very considerable overlap in inhabitants!

Rosemary
Steve Fryatt
2019-12-05 20:44:48 UTC
Permalink
Post by f***@gmail.com
Post by c***@gmail.com
Sorry - I thought this was a different forum from Archive O L!
Different forum, but very considerable overlap in inhabitants!
Indeed. I'll also echo Martin's request.
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
John Williams (News)
2019-12-05 21:01:59 UTC
Permalink
Post by Steve Fryatt
Post by f***@gmail.com
Post by c***@gmail.com
Sorry - I thought this was a different forum from Archive O L!
Different forum, but very considerable overlap in inhabitants!
Indeed. I'll also echo Martin's request.
Would "participants" be a better word than "inhabitants"?

After all, most of us have other lives! Perhaos!

John
--
John Williams, now back in the UK - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/
c***@gmail.com
2019-12-06 13:03:20 UTC
Permalink
Post by Steve Fryatt
Post by f***@gmail.com
Post by c***@gmail.com
Sorry - I thought this was a different forum from Archive O L!
Different forum, but very considerable overlap in inhabitants!
Indeed. I'll also echo Martin's request.
--
Steve Fryatt - Leeds, England
http://www.stevefryatt.org.uk/
OK message received.

But which should I use in preference in future for this sort of query?
i.e. which is likely to have more (better?) knowledgeable users?
You will have gathered by now that I am a very infrequent user of these groups and am likely to forget the rules!

cheers
George Pearce
John Williams (News)
2019-12-06 14:07:19 UTC
Permalink
Post by c***@gmail.com
But which should I use in preference in future for this sort of query?
i.e. which is likely to have more (better?) knowledgeable users?
This group will elicit a much faster response than the AoL mailing list,
and you will find a wider pool of expertise here!

John
--
John Williams, now back in the UK - no attachments to these addresses!
Non-RISC OS posters change user to johnrwilliams or put 'risc' in subject!
Who is John Williams? http://petit.four.free.fr/picindex/author/
Matthew Phillips
2019-12-06 15:59:33 UTC
Permalink
Post by John Williams (News)
Post by c***@gmail.com
But which should I use in preference in future for this sort of query?
i.e. which is likely to have more (better?) knowledgeable users?
This group will elicit a much faster response than the AoL mailing list,
and you will find a wider pool of expertise here!
As far as I'm concerned it's a question about RISC OS programming and
comp.sys.acorn.programmer is a perfectly appropriate place to ask those
questions.
--
Matthew Phillips
Durham
Loading...