Feature requests

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Wayne Diamond
User
User
Posts: 38
Joined: Tue Dec 30, 2003 1:37 pm
Location: Australia

Feature requests

Post by Wayne Diamond »

Ok no holding back, here goes :)

- The entire forum database in a downloadable file, updated every few months or so, so that an offline forum search program can be made so that code can be found in seconds. Think MSDN but with Purebasic's forum contents as the data.

- Macro support for inline assembly (but i have a sneaking suspicion that this is already possible by using inline asm sent straight to the fasm assembler?)

- Allow ProcedureReturn to return any 8, 16 or 32-bit register, ie. ProcedureReturn cx

- Add an optional [length] field to the HEX() cmd. So, HEX(20,6) will return "000014"

- Do/Loop's (i thought all basic syntaxes supported those keywords? ... :))

- "Enable Inline ASM support" - is there any reason not to have that enabled by default?

- Some sort of visual indicator on the main window somewhere that showed whether the Debugger was enabled, InlineASM enabled, etc (maybe add them to the toolbar under the main menu?)

- Please add "&" symbols to the main menu items to make them easier to navigate with the keyboard, ie "Save" should be "&Save", "Save As" should be "Save &As", etc. I know that some already have designated keyboard shortcuts such as Ctrl+S for Save, but many don't, and it'd just be nice to have the usual keyboard shortcuts that most programs have :)

- Any way to customise the colours? The current color scheme just doesn't do it for me ... :)

That's all (for now)!

Cheers,
Wayne
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Colours: File .. Preferences .. , then a "coloring" select list with all the bits you can mod.

Good requests.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

we saw the for now :-)
( 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... )
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Re: Feature requests

Post by Rings »

Wayne Diamond wrote: - The entire forum database in a downloadable file, updated every few months or so, so that an offline forum search program can be made so that code can be found in seconds. Think MSDN but with Purebasic's forum contents as the data.
As i remember did Andre collect all sources (usefull ones) for his site purearea.net . there is also a downloadable version of the snippet-collection.
Wayne Diamond wrote: - Macro support for inline assembly (but i have a sneaking suspicion that this is already possible by using inline asm sent straight to the fasm assembler?)
You answer yourself. Use the ! in Front and you have full access to the fasm-commands, including their macro-features (thx Prvalov for his great assembler)
Wayne Diamond wrote: - Allow ProcedureReturn to return any 8, 16 or 32-bit register, ie. ProcedureReturn cx
All Procedures return their values in the EAX register, so you have to move them their manually
!XOR EAX,EAX
!MOV ex,CX
Wayne Diamond wrote: - Please add "&" symbols to the main menu items to make them easier to navigate with the keyboard, ie "Save" should be "&Save", "Save As" should be "Save &As", etc. I know that some already have designated keyboard shortcuts such as Ctrl+S for Save, but many don't, and it'd just be nice to have the usual keyboard shortcuts that most programs have :)
- Any way to customise the colours? The current color scheme just doesn't do it for me ... :)
Do you remember that the source for the Editor (written in Purebasic itself)is still available ?

and 2 more hints (as i remember you love asm ):

Compile with the /Commented- switch to view/edit the Purebasic-Compiler-Output(assembler) before process the assembler(fasm), an option that you never can do with Powerbasic ;)

Did you recognize the Purebasic' buildin disassembler ? search the OnErrorLibrary (in the Helpfile) for those commands
SPAMINATOR NR.1
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Re: Feature requests

Post by GPI »

Wayne Diamond wrote: - "Enable Inline ASM support" - is there any reason not to have that enabled by default?
You can get conflicts with Variable-Names and Assembler-Commands.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

About 'Do-Loop', it sounds like 'Repeat-Until' :). A bit more precision about the /COMMENTED flag: as Rings said, you can generate the assembly file with /COMMENTED, change it manually to optimize some critical part and the use the /REASM argument to build again the exe based on your changes.
Last edited by Fred on Fri Jan 02, 2004 11:39 am, edited 1 time in total.
plouf
Enthusiast
Enthusiast
Posts: 281
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Post by plouf »

- Do/Loop's (i thought all basic syntaxes supported those keywords? ... )
im my knowledge do/lloop from other dialects is Repeat/Until here
(or do you mean to change te keyword name ?)
Christos
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Should be nice Do [While|Until] , Loop [While|Until|Forever].
And remove While-Wend and Repeat-Until.

But perhaps it is too late... :?

@Wayne Diamond; if you like ASM, i advise you to program using ! as prefix for all ASM mnemonics. (Rings explained below too.) This brings your code directly to FASM, and this means full access to FASM macros, etc. and not needed to "Activate ASM Code" in Compile Options... :arrow:
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

Psychophanta wrote: ..remove While-Wend and Repeat-Until.
:!: :?: Are you nuts?!? :?: :?:
Every Basic dialect has these... and they are needed.

oh btw: you mentioned "Do Forever".. you can do "Repeat Forever"... :D

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: Feature requests

Post by tinman »

Wayne Diamond wrote:- Add an optional [length] field to the HEX() cmd. So, HEX(20,6) will return "000014"
You can always use Right(Hex(20), 6) for now. Sure, you'll end up with two string operations instead of one, but if you're worried about speed I'm sure you could hack up a Hex replacement easily enough.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Psychophanta wrote:Should be nice Do [While|Until] , Loop [While|Until|Forever].
And remove While-Wend and Repeat-Until.

But perhaps it is too late... :?
Why remove while-wend and repeat-until?

And why for loop forever?

Code: Select all

do
  ;stuff
loop
Should be engouth.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

GPI:
Wayne Diamond a écrit:

- "Enable Inline ASM support" - is there any reason not to have that enabled by default?


You can get conflicts with Variable-Names and Assembler-Commands.
indeed by turning on this option, a variable named "div" on my code was seen as an ASM command DIV with bad parameters ;)
- Registered PB user -

Using PB 4.00
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

GPI wrote:
And why for loop forever?
Code:
do
;stuff
loop

Should be engouth.
Yes; you are right.

Why remove Repeat-Until and While-Wend?
Because should be a surplus, don't?
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

If we have Macro-features in Purebasic we could write a Do/Loop Construct by ourselfs ( hint -> Fred (do the easy ones ) ) ;)
SPAMINATOR NR.1
Wayne Diamond
User
User
Posts: 38
Joined: Tue Dec 30, 2003 1:37 pm
Location: Australia

Post by Wayne Diamond »

Thanks, ive got macros working easily enough with inline asm now, but it'd also be nice to have macros at the Purebasic/preprocessor level!
I've also now got a very sexy color scheme, damn it looks good.

I see no reason to remove language constructs that already exist - if you don't use them they don't get compiled into your exe, so 'surplus' isn't really an issue. By providing these constructs (While/Wend, Do/Loop etc), you'll find that programmers coming from other basic compilers will find it a lot easier and quicker to get acquainted with Purebasic.

Newbie,
indeed by turning on this option, a variable named "div" on my code was seen as an ASM command DIV with bad parameters
And the lesson learnt? - Use proper variable names, never name your variables after instructions! :) If you ask for trouble, the compiler is more than happy to give it to you. :D

Tinman,
You can always use Right(Hex(20), 6) for now. Sure, you'll end up with two string operations instead of one, but if you're worried about speed I'm sure you could hack up a Hex replacement easily enough.
Thanks, but Right/Left pads it out with spaces, not the "0" numeric char which is needed for such a Hex function, but it'll be easy to knock up in asm - looks like that'll be on tonights menu ... :)

Thanks fellas
Post Reply