Posted by
GuShH on September 5, 2009
This is a tool that I’ve been using for quite a long while, just recently I fixed a small bug in the regexp and I thought it was time to share it.
For those of you using the official IDE, there’s no real solution to this “problem”. When you’re working on something small, it’s not a big deal to define a couple of declares here and there… However, on bigger code this becomes a real issue!. So why waste the time switching between IDEs or doing it by hand?…
Grab it and let me know how it runs! (nasty ugly source included).
The tool is very simple to install, I recommend you unzip directly into your PB directory and configure it as follows:

That’s it. You’re ready to declar’em!.
Cheers.
Posted by
GuShH on July 2, 2009
As usual, I was browsing the PureBasic forums to see what was new, nothing much (heh…) but something caught my attention, the fact that some user requested for the IDE’s message dialogs to be “centered” ( because he had multiple displays and the messages would appear in between them ) just to get shit-faced by an actual staff member!
You can’t just say “it’s Microsoft’s fault” — Are you in some sort of mac-only cleanse?, What’s your #%&%#$ problem?!
Those who “pass the ball” (as the user suggested) are part of the problem. You, being a programmer can certainly code a simple CBT hook, right?. Are you against hooks, perhaps – you are a purist, I hear… Sorry, but sometimes solutions are “dirty” and you have to live with them.

Just for the record, I too use a split-screen and I find it annoying that dialog boxes are not centered to their parent.
More…
Posted by
GuShH on June 11, 2008
If you’re used to PHP, you might of know the functions ‘quotemeta();’ and ‘addslashes();’ are very, very useful when dealing with user Input and similar activities where escaping certain entities (characters!) is very important.
This routines, while not too elegant, do the same (or similar) job as PHP but in PB:
The equivalent to quotemeta(); in PHP can be found in here.
Whereas the addslashes(); counterpart is located in here.
(I know, the PHP lexer I’m using has a bug on the PB definition, I’ll take a look later).
Posted by
GuShH on June 11, 2008
Whenever I have to manipulate strings in PB, on a low-level (ie. per-character basis) I find it almost imperative to have the following routines included in my project:
is_alpha(); is_numeric(); is_symbol();
They are amongst the most basic routines out there, however, they are still useful nonetheless.
You can grab the include/source from here: http://gushh.net/dev/?file=pb/ascii_helpers.pb
If you’re working on a Lexer, Parser, or similar… this will come in handy in case you don’t have it already.
Cheers.