Author |
Topic: A MIN and MAX operator (Read 1303 times) |
|
hellomike
New Member
member is offline


Gender: 
Posts: 46
|
 |
A MIN and MAX operator
« Thread started on: May 26th, 2015, 7:40pm » |
|
Hi,
If BB4W is still being enhanced, for a future version it would be nice to have MIN and MAX operators.
I.e.
PRINT 23 MIN 3 PRINT 23 MAX 3
would print
3 23
Just a suggestion.
Thanks
Mike
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: A MIN and MAX operator
« Reply #1 on: May 26th, 2015, 9:13pm » |
|
on May 26th, 2015, 7:40pm, hellomike wrote:If BB4W is still being enhanced, for a future version it would be nice to have MIN and MAX operators. |
|
I would need some convincing that these deserve inclusion as built-in operators, when the user-defined equivalents are so straightforward and elegant (and indeed can be found in LBLIB):
Code: DEF FNmin(a,b) IF a<b THEN = a ELSE = b
DEF FNmax(a,b) IF a>b THEN = a ELSE = b which you can use as follows:
Code: PRINT FNmin(23,3)
PRINT FNmax(23,3) Richard.
|
|
Logged
|
|
|
|
hellomike
New Member
member is offline


Gender: 
Posts: 46
|
 |
Re: A MIN and MAX operator
« Reply #2 on: May 27th, 2015, 8:00pm » |
|
I feared an answer like this was coming. This was not a how-to question otherwise I would have put it in another forum. I'm using functions like that for 30 years.
But if you want convincing, here it is: 1. I thought it was nice to see people make suggestions and provide feedback 2. FN() is slower and less elegant 3. We do not have to write separate n-var, s-var (array()) functions 4. It is awesome to have new functionality and see the product to become even better
In case you had doubts... My suggestion was not meant to complain about shortcomings. Again, this IS a suggestion box......
Regards,
Mike
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: A MIN and MAX operator
« Reply #3 on: May 27th, 2015, 10:27pm » |
|
on May 27th, 2015, 8:00pm, hellomike wrote:I feared an answer like this was coming. This was not a how-to question |
|
It seems to me entirely appropriate to respond to a suggestion of that sort with details of the best available alternative.
I doubt that you would have preferred a response along the lines of "Development of BB4W has ceased, so sorry there's no chance of that functionality ever being added". Whilst true, that would have been an entirely negative and unhelpful reply.
Quote: I'm using functions like that for 30 years. |
|
You may well have been aware of the user-defined-FN approach, but other people reading the forum may not. My response was not just addressed to you but intended to be informative to a wider readership.
Quote:We do not have to write separate n-var, s-var (array()) functions |
|
It doesn't follow that you need to. Putting the functions in a library solves that problem, and I specifically mentioned that the MIN and MAX functions are available in LBLIB.
Quote:It is awesome to have new functionality and see the product to become even better |
|
I hold an almost opposite view. To me some of the greatest strengths of BB4W are its reliability, stability and freedom from bugs - all of which are put at risk when any changes are made. I find it hard to maintain confidence in products which keep 'evolving'.
Richard.
|
|
Logged
|
|
|
|
hellomike
New Member
member is offline


Gender: 
Posts: 46
|
 |
Re: A MIN and MAX operator
« Reply #4 on: May 28th, 2015, 7:30pm » |
|
Quote:I doubt that you would have preferred a response along the lines of "Development of BB4W has ceased, so sorry there's no chance of that functionality ever being added". Whilst true, that would have been an entirely negative and unhelpful reply. |
|
For the suggestion I made, I was expecting an answer why it would or wouldn't be considered. So albeit disappointing, that actually would have been a better answer. You could have added the statement that there are functions available in free libraries offering that functionality.
Quote:I find it hard to maintain confidence in products which keep 'evolving'. |
|
You couldn't be more right about this. Only too many programs in the world that offer a lot but at the cost of a zillion bugs. And BB4W certainly isn't among these bloatware programs. It is very reliable, very stable and very bugless. Actually BB4W is a perfect example of software I wouldn't worry one bit that it becomes unreliable when new functionality is added!
Still, if appreciated, I might make further suggestions in the future.
Mike
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: A MIN and MAX operator
« Reply #5 on: May 28th, 2015, 10:09pm » |
|
on May 27th, 2015, 10:27pm, g4bau wrote:To me some of the greatest strengths of BB4W are its reliability, stability and freedom from bugs |
|
I should have qualified that by saying BB4W v5; version 6 is far too new to have yet acquired that reputation.
Richard.
|
|
Logged
|
|
|
|
hitsware
Junior Member
member is offline


Gender: 
Posts: 70
|
 |
Re: A MIN and MAX operator
« Reply #6 on: May 29th, 2015, 01:46am » |
|
>>
I doubt that you would have preferred a response along the lines of "Development of BB4W has ceased, so sorry there's no chance of that functionality ever being added". Whilst true, that would have been an entirely negative and unhelpful reply.
>>
If that's true then from whence is version 6 coming ?
|
« Last Edit: May 29th, 2015, 01:48am by hitsware » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: A MIN and MAX operator
« Reply #7 on: May 29th, 2015, 08:50am » |
|
on May 29th, 2015, 01:46am, hitsware wrote:If that's true then from whence is version 6 coming ? |
|
Version 6.00a isn't "coming", it's here - it was released on 1st January 2015. It will be the last ever release of BBC BASIC for Windows apart from essential bug fixes, if any are discovered.
But in any case v6.00a does not represent a development of the language, only the introduction of new (and deletion of obsolete) data types. Formal development of BB4W ceased more than six years ago, with the release of v5.90a at the beginning of 2009. All subsequent releases have been maintenance releases.
The most recent occasion on which a new keyword was added to BBC BASIC for Windows was the incorporation of EXIT* in version 5.60a (May 2007). Adding a new keyword obviously compromises compatibility with existing programs (since variables starting with that keyword become invalid) so has been avoided since.
That no significant language development has taken place for a very long time can be seen by the fact that the BB4W run-time-engine, BBCWRUN.EXE, has not increased in size by even a single byte since v4.00a was released almost exactly ten years ago!
Richard.
* Even that was criticised at the time for damaging compatibility. It was suggested that re-purposing an existing keyword such as QUIT or STOP would have been better.
|
« Last Edit: May 29th, 2015, 09:17am by rtr2 » |
Logged
|
|
|
|
hitsware
Junior Member
member is offline


Gender: 
Posts: 70
|
 |
Re: A MIN and MAX operator
« Reply #8 on: May 30th, 2015, 01:14am » |
|
Well ................................................................ Good for Music , that's for sure ....
https://www.youtube.com/watch?v=ePhUBBGyVmI
|
|
Logged
|
|
|
|
|