My Wish List

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

My Wish List

Post by RichardL »

After eight years with GFA Basic and a flirtation with Power Basic, my considered short list of PB enhancements is currently as follows:


1. MAX and MIN
==========
I found that GFA's MAX and MIN were handy to limit ranges:

n = MAX(x,y) ; n gets the higher of x,y
x = MAX(x+2,MaxXValue) ; increases x by 2 with a limit


Nice, because optimised function shoud be very fast...
n = MAX(MyArray()) ; returns highest value in array
i = MAXARRAY(MyArray()) ; returns index of highest value

Similar for MIN( )

2. RANGE
======
RANGE might be handy:

Flag = RANGE(100,n,200) ; returns TRUE if n is between or at limits, else FALSE

3. CASE
=====
I have already requested that the CASE statement be improved, and sorry to bring it up again. I wrote a lot of code over the last few evenings and this would truly improve the language. I have an irrational hate of cascaded ElseIf...

CASE 1 TO 15
CASE 1,5,9,85
CASE 1 TO 15, 42 ; Because I just added another option!

4. WindowMouseX() = X
===============
Again, I mentioned this before, but its such a simple thing to add. A kind forum contributor pointed me at the solution, so my program works as I intended.

5. Colouring Buttons
=============
Again, thanks to a forum contributor for helping me get some buttons coloured properly. How about:

SetGadgetColor(#Gadget,RGB(r,g,b),Text/Background)

6. NON INTEGER INCREMENTS in FOR / NEXT / STEP
=================================
This was a nasty surprise for a new user! OK, I wrote the loop using Repeat/Until, but sometimes For/Next.

Looking back over the last week, I found work arounds for all the language features that I encountered. One of the most important words to remember is FORUM... thats where problems truly get solved... so why not put calls to the PB Website and MSDN on the menu? (Like Power Basic's SED editor.)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

great how people have similar wishes :-)

follow the links, i'd say...

http://www.xs4all.nl/~bluez/datatalk/pure2.htm#top
http://www.xs4all.nl/~bluez/datatalk/pu ... 2_wishlist

(another gfa user, good :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply