PowerBasic – why ?
Some may wonder, why do I use Powerbasic ?
There are a lot of Basic compilers available on the internet developed by independent developers or small companies, but none have ever come close to what I get from Powerbasic. I have looked into FreeBasic, PureBasic, XBasic, RealBasic, IBasic, CreativeBasic and others, but none have come close to what I get from Powerbasic. So what is the difference ?
Many of such Basic compilers are geared towards DirectX and building games. The code editors are not always that great, but they may excel in the area of DirectX graphics or possibly 3D. I am not that interested in DirectX or game develop so they don’t fit my criteria. Most of the software I have ever written was for businesses and so the Windows Desktop experience is was is critical. Also I need a decent code editor. The Powerbasic code editor is very good in my opinion. It is not fancy, but it works and works well, since I tend to be a fast coder. When I get in my full programming mode, I can churn out code at a fast rate, so I need a code editor which can keep up. I don’t want a code editor (like some game Basics) which has weird colors or works in directx mode. I want a good old Windows UI code editor and Powerbasic does the job.
Next, the language is critical. I have been programming in basic for a couple decades now and I need Basic language which fully supports the syntax I am familiar with. In the DOS days I worked with QBasic, QuickBasic and PDS 7.1 and that I consider the standard of the Basic syntax. I don’t want a Basic compiler which was developed by a C programmer. When I see long time Basic syntax changed to suit the compiler developer, rather than stick with the long time standard, that turns me off. PowerBasic is one of the few Basic compilers today, which allows me to write code like I always have, while still offering me more modern contructs not found in older Basics. For example I prefer to use data type identifiers with variable names (ie. MyVar&) because it makes variables stand out from the rest of the code. Now Powerbasic allows me to do this and it also supports the more modern syntax of using the AS DateType syntax. I want to be able to use commands like GOTO, GOSUB and ON GOSUB. I also want a Basic which gives me newer stuff which was not in older Basics. Things like code pointers, data pointers, calling functions via pointers, etc. Powerbasic has these in abundance.
The most important aspect of any Basic compiler is the variable length string data type. Some Basics emulate the string data type using C’s Asciiz type. Basic strings need to be able to store anything, include the null character (CHR$(0)), so that does not work. Powerbasic, very smartly uses the Windows OLE string API’s internally to handle variable length strings, so you get real variable length strings which can hold anything in them at any length. I can even store a structure (TYPE) data type within a variable length string variable, using pointers. Powerbasic has such a rich set of data types that it really can handle almost anything.
While I don’t use any OOP or COM, PowerBasic does support both in case I find a need for it someday. This may be more important to others though and so it is vital that a compiler support them as Powerbasic does so well. For newer programmers PowerBasic supports its own GUI command set, which is rudimentary, but it gets the job done. I don’t use Powerbasics GUI command set (called DDT) at, since I work with the Windows API directly and my own GUI engine is far superior to what is in the PowerBasic language. While that may sound like Powerbasic is lacking, actually it is not, since remember that my own GUI engine (EZGUI 5.0) was built using PowerBasic. That is the beauty of PowerBasic. Combined with the Windows API, if PowerBasic does not have something, often you can create it yourself using PowerBasic.
Now where PowerBasic really gets exciting is when it comes to execution speed and the size of compiled apps or dlls. The only way I could write faster applications would be if I wrote them in assembler and guess what, PowerBasic supports inline assembly code. This means that a programmer that knows assembler, can write the fastest apps possible using Powerbasic. Use Basic when speed is not critical and assembler when it is. Now I don’t use assembler currently (been a long time since I did assembler and that was for the old DOS model), but it is good to know that it is there if I ever need it. I have found that the Powerbasic execution speed is so good that I don’t really have any need for assembler. Even my proprietary 2D sprite engine is written in normal Basic and not assembler and I get very good execution speed from it. When it comes to the size of EXE or DLL’s it creates, you would be hardpressed to fine anything which does better. Sure you might be able to create a tiny EXE smaller with another compiler like Freebasic or some other, but often such apps aren’t real world code. Powerbasics language is so rich, especially when it comes to string functions, that when you write a full blown application you likely will be able to produce compiled apps that are possibly the smallest around. How do I know ?
Because thats what I have produced using Powerbasic. My own EZGUI GUI engine is amazingly small in size for the features it supports. I like to use Visual Basic 5.0/6.0 as a comparison. The VB runtime is 1.4 meg in size, but that does not even support much of the UI features you require for most applications. With VB you will require additional OCX controls for things like the common controls, the common dialogs, etc. Once you add up all the extra OCX controls you start getting runtimes which are 3 or 4 megabytes in size. When you look at the C++ runtimes for the C++ language they can add up and don’t get me started about the dot.net framework and is size. Yet, EZGUI 5.0 which was created using Powerbasic 9.0, has a complete GUI engine, drag and drop engine (build your own WYSIWYG style apps like a Designer), graphics engine, the common controls, richedit control, HTML help display, multiple custom controls (MCI, Turtle Graphics, Masked Edit, Drag Handle, Shape/Hotspot/Splitterbar, Files Listbox, Property Listbox) plus a Canvas control with a 2D proprietary Sprite engine and a 3D glCanvas control with a proprietary OpenGL based 3D scripting language and much more and it all weighs in at about 1 megabyte in size. I give all the credit for this to the PowerBasic compiler. I could have never created anything like this using Visual Basic and I am not a C programmer so that wouldn’t do either.
Now the one thing, which is easily overlooked, is the reliability of the compiler and the executables it generates. PowerBasic has proven itself extremely reliable in my opinion and I have been using it for about 10 years now and I have a number of customers who use my GUI engine and Powerbasic together to build commercial applications who also have found both to be very reliable. Do not underestimate the important to a quality compiler which produces rock solid executables. If there was one thing which I considered the most important about a programming language (compiler) it is this. Reliability and stability are an absolute must and personally I feel Powerbasic is at the top of the heap when it comes to this. At least in my use it has proven itself.
Lastly, the Powerbasic command set is very rich compared to others. Now I am not refering to a bunch of prewritten classes or objects some languages may use, but I am refering to the native commands of the language. Powerbasic likely has one of the most powerful string command sets I have seen. The one thing I like about Powerbasic is that there is often more than one way to accomplish the same thing. Maybe you don’t like how a native string command may work, so you can create your own version using pointers or even inline assembler. Often there is more than one way to accomplish the same thing.
Now when it comes to building user interfaces, the beauty of Powerbasic is that you can handle this in a number of different ways. Powerbasic has its own DDT command set, which while somewhat limited, is powerful enough for most needs and they provide a optional Visual Designer called PBForms for generating the code for you. The beauty of DDT is that is produces very, very small executables. There is very little overhead with DDT, so if you want a nice UI and a tiny compiled EXE with no runtime dependencies, then DDT may suffice for most users. Then there is the FireFly Visual Designer, which caters to those who want to also write small apps with no dependencies (other than the operating system of course), but instead using the pure Windows API in a Visual Designer similiar to VisualBasic. FireFly (see: http://planetsquires.com ) is an excellent third party development tool for a very reasonable price. If you want a Visual Basic like experience, then FireFly may give you want you desire. Powerbasic has a done a good job of encouraging third party developers and there are some excellent third party tools for use with Powerbasic and most of them are also likely written in PowerBasic as well. If you want advanced graphics then check out GDImage from ZapSolution (see: http://zapsolution.com/ ). An excellent Grid control for use with Powerbasic My Little Grid (MLG can be found at same site as FireFly developer) and also EGrid and SIGrid (see Powerbasic website for links).
Lastly, the PowerBasic peer to peer forums are probably one of the best programming forums around. The forum is moderated and members must use their real names (tends to encourage a more professional attitude from members). There are many very experienced and excellent programmers who visit these forums and they are all Powerbasic programmers. There is even a third party forum which is moderated and attended by some of the “cream of the crop” Powerbasic programmers (see: http://www.jose.it-berater.org/smfforum/index.php ) . Some very advanced stuff is often discussed on that forum.
If you haven’t checked out Powerbasic yet, you really should. It is a professional level BASIC language compiler for a reasonable price. They even have a less expensive Classic version perfect for hobby programmers, which is actually just a previous version of there current compiler.
Now I should also mention my own web site and its online forums for EZGUI users. Powerbasic is great, but when combined with my own EZGUI 5.0 Professional GUI engine you can do some amazing things. It makes 2D and 3D animation easy and it provides you with a rich UI command set, which does things even many experienced Windows API programmers would find difficult to do. EZGUI even has its own drag and drop Visual Designer for code generation, which uses a unique “Smart Parser” technology to integrate the Powerbasic IDE (code Editor) with itself. My Visual Designer is itself an EZGUI aplication which uses the EZGUI framework.
Some of my customers are producing some very exciting commercial applications with EZGUI and all created using the Powerbasic compiler.