Classic PowerBASIC for Windows is a native code compiler for all versions of Windows, from Windows 95 to Windows 10. It creates standard WIndows GUI (Graphical User Interface) applications. It creates highly efficient executables and industry-standard DLLs for optimum flexibility. The machine code generated by PowerBASIC is among the most efficient in the industry, both in terms of size and speed. It compares most favorably with leading compilers of any dialect, Pascal, C++, Fortran, and others. With PowerBASIC, you'll end BloatWare forever!
This newest Classic version of PB/Win sports a number of exciting new features. Create client COM applications and COM components using Dispatch, Direct, Automation, or Dual interfaces. The inline assembler has been expanded to support the full range of SIMD opcodes. A complete graphics engine, a printer package for Windows-Only printers, dynamic pointers, and thread local storage, to name just a few. But more about them later.
Dynamic Dialog Tools
DDT allows you to create a complete graphical user interface with ease, using just built-in statements and functions. DDT is perfect for many applications, as it gives you complete access to all of the standard controls like menus, buttons, listboxes, text boxes, labels, bitmaps, listviews, treeviews, and much more. You can specify custom colors, custom fonts, and custom styles, and best of all, your dialogs are truly dynamic! Controls can be modified, resized, moved, disabled, all under program control. Perhaps even more important, they're fast, fast, fast... loading as much as 20 times faster than Visual Basic forms. Try our complete SMTP email client, a 30k executable with a graphical user interface, that allows you to send an email message to anyone on the internet. Some other compilers can't display "Hello" in a program 40 times that size! Of course, for more complex user interfaces, you should probably consider PowerBASIC Forms, our state-of-the-art Visual Dialog Designer.
"I have been a PowerBASIC fan for years. I cannot imagine why anybody would use
VB or .NET but I suppose it is all about marketing. Talk about the Total Cost
Of Ownership!!!! One programmer and PowerBASIC can do what takes a room full
of .NET folks to write and maintain."|
- Mark Strickland,
Chief Engineer SimplyBASICsecurity.com
PowerBASIC has long been associated with performance. Our motto has always been smaller-faster, smaller-faster, smaller-faster. In fact, it's been said more than once that PowerBASIC is the "Consultant's Secret Weapon". So, how does it really stack up? In our comparisons, we've found that PowerBASIC can outperform Visual Basic by a factor from 3 to 23 times. That's correct, it's up to 2,300% faster than VB! Of course, PowerBASIC never requires any DLLs or run-times of any sort. So specifications on program size can be even more impressive. A "Hello, World!" program in VB is over 1,400,000 bytes with the necessary runtime code... but with Classic PowerBASIC Compiler for Windows? Just 5,632 bytes on disk, or 2,615 bytes in memory. That's something like 23,000% smaller than Visual Basic!
So just how fast is PB/WIN anyway? We thought you'd never ask! This tiny example may give you some idea of the power in PowerBASIC.
x## = 1 y## = 1.000001 t! = Timer For i& = 1 To 100000000 &Nbsp; x## = x## * y## Next t! = Timer - t!
What do we have here? 100,000,000 iterations of a simple floating point operation. On an AMD 64 CPU, PowerBASIC 3.5 for DOS runs this loop in 1.977 seconds. Pretty respectable, we think. PB3 has been benchmarked favorably against every sort of compiler... C++, Pascal, QuickBasic, you name it. It's always competitive.
So what about the Classic PowerBASIC for Windows? Same computer. Same operating system (WinXP Pro). Same source code, line for line. No attempt to minimize any background tasks. Elapsed time: 0.209 seconds. May we repeat that? Elapsed time: 0.209 seconds. That's an instant gain of around 945%! Windows versions of PowerBASIC are more than nine times faster than the best DOS Basic around!
So why the big difference? A number of reasons... Attention to detail. Attention to results. A philosophy that requires us to provide the very best possible code generation. We simply don't believe that sloppy coding can always be overcome by ever faster hardware. At some point, every programmer (ours included!) must take on the obligation to write quality code... and we take that obligation very seriously. That's why our entire compiler, including all the library code to be linked, occupies less than 265K! Compare that to multi-megabyte compilers that seem more like dinosaurs! That's a simple example of the attention we pay to careful programming.
Of course, performance is a factor of technical design issues, too. Like Register Variables. Normally, every time a variable is altered, assigned, or retrieved, memory must be accessed. That's a relatively slow process, as compared to accessing CPU and FPU registers. So PowerBASIC stores 4 float variables and 2 integer variables from each Sub/Function in a register instead of memory. Simple concept, but very effective. If those variables are referenced frequently, the improvement can be dramatic. Moreover, we let the programmer decide which variables should be register variables... that way, you can decide which will be most helpful. And if you still decline to choose, PowerBASIC will try to pick the best candidates for you, from those at hand.
|So, how about graphics? Create a graphic control, open a graphic window, and you're ready to go! You'll use GRAPHIC PRINT to draw plain text or fancy text... Any font. Any size. Any color. Any escapement. Bold. Underline. Italic and strikeout. Mix any combination of fonts on any window. Print just about anything, just about anywhere, even on private bitmaps that aren't yet visible. You'll copy or stretch bitmaps. Shrink them or change them. Circles, ovals, lines and boxes. Fat lines, skinny lines, stylized lines. Arcs, circles, rounded rectangles. Ellipses, pie sections, polygons, polylines. Even get or set pixels -- one by one. Filled forms or empty. Colors or not. The choices are endless. You can mix new colors with those which exist, and measure proportional text size before you print it. Then create a custom scaling system, even with fractional floating point coordinates! Of course, once you've built that work of art, you need to load and save it: you'll load from a resource, load and save a BMP on disk!|
Another interesting point is that graphics are extensible. Using the DC (Device Context) from Classic PowerBASIC, you can call the Windows API, your own custom code, even third-party code for special graphic functions. With GRAPHIC GET/SET BITS, you can even manipulate the bitmap directly... each pixel is stored in succession as a long integer color value.
And then there's printing. Access to printers has always been something of an issue, but not any more. First, we added the complete family of LPRINT functions, to give you direct text access to line printers. Then, we took it a step further with extended printing (XPRINT), even for "Windows-Only" printers! Just like GRAPHIC for the screen, XPRINT offers it all on the printer. Print plain text or fancy text -- any font, any size, any color. Bitmaps and images, lines and boxes, circles and polygons, virtually all the features of the GRAPHIC screen are there for printers, too! You can retrieve the size of the printer page, the printable area, the margins, even the number of points per inch. Select landscape or portrait mode, even the print quality setting. The PRINTER$() function returns the name and port of every available printer. You can attach a printer by its name, by default, or just display a printer dialog to let the user decide. It's all in there.
A complete Macro facility is an exciting addition to the latest version, and that's something seldom seen in a high level language. Essentially, a Macro invokes a text substitution engine which allows you to extend the PowerBASIC language in ways not seen before. PowerBASIC supports single line macros, multi-line macros, even function macros which return a result. And they don't occupy one byte of code space unless actually used. Each macro may take up to 240 arguments, so configurability shouldn't be an issue. MACROTEMP may even be used to specify identifiers which are made unique to each macro expansion, thus avoiding name conflicts. With PowerBASIC macros, you can design your own unique, personal language!
Thread Safe Code
PowerBASIC is entirely thread-safe, so multi-threaded applications are a breeze. Isn't it good to know your program can handle 2, 3, or 5000 tasks, all at the same time? You can print a report, while still allowing data entry. Watch for a hardware signal, while calculating data services. All the power you need is packed right into the PowerBASIC Thread Statement, along with its simple extensions. Classic PowerBASIC even offers THREADED variables for "Thread Local Storage" -- each THREAD get its own unique copy of the variable -- automatically.
Build COM Components
COM Components (Servers), create Dispatch, Direct, Dual, or Automation COM Components using easy to use built-in Basic like statements. Create classes with multiple interfaces, inheritance, constructors, destructors, private class methods, override inherited base classes, and much much more. Every object created or defined in PowerBASIC is fully compatible with the COM specification. Many popular compilers are not able to make that claim accurately. The COM specification defines a standardized method of communication between modules of code (frequently called components), regardless of the platform or the tool used to create them.
Client COM services, and support for the Dispatch, Direct, Automation, and Dual Interfaces lets you tap the power of components. Invoke libraries and applications with ease, all controlled from your Classic PowerBASIC client program. You'll find that the PowerBASIC object implementation is very efficient, with virtually no degradation of execution speed as compared to standard Subs and Functions. Invoke an instance of Microsoft Word, load and edit documents, all under the control of PowerBASIC? It's all there now, waiting for your command...
Integrated Development Environment
The Classic PowerBASIC IDE has had some major improvements. There's support for project files. Open multiple source code files from a single project file, even if the source files are saved in different locations. Further optimized debugging speed with improved reliability. The debugger also now support evaluation and modification of Field, Bit, and SBit variables. The IDE can insert a GUID (CTRL+ALT+G) which allows insertion of a unique GUID for COM and other operations. There's improved handeling of bookmarks and breakpoints. Printing from the IDE has been improved with margins and header with page, file information, date-time stamp and a separating line. All this, and even more, make the new IDE a joy to use.
Extra debugging tools? Classic PowerBASIC shines with an array of built-in functions. PROFILE gives an overview. A list of every sub and function, how many times each was called, and the total time spent executing each of them. CALLSTK captures all stack frames above you. It answers, "How did I get here?". TRACE generates an execution log of each sub, function, label, and TRACE PRINT, as they're executed in sequence. It gives you parameter values, return values, even error codes. TRACE answers "Where have I been?", and "How did I get here?". With these tools, debugging might now be fun!
You know, a quality compiler must offer data types to suit the needs. And Classic PowerBASIC handles that with ease. Signed and unsigned integers to 64-bit. Single, double, and extended precision float. Two forms of currency. Dynamic strings, fixed strings, ASCIIZ strings. User-defined Types and Unions. Guids. Variants, pointers, and more. Now, we've added BIT and SIGNED BIT variables in TYPES and UNIONS. Each may be from 1 to 31 bits wide, packed one after another. Perfect for bit coding, or translation from C code. And FIELD variables? They work with the new FIELD statement, just like in DOS versions of BASIC. A FIELD is a string, mapped to a specific section of a file buffer, or even another string. They're allocated at run-time, so they can be changed as needed. Much like a TYPE that can be altered under program control. Best of all, a new internal design makes them fast, fast, fast!
Pointers are great, but sometimes the syntax is daunting, particularly for very simple tasks. So we implemented Dynamic Pointers, using the original PEEK/POKE as a model: xx# = PEEK(DOUBLE,addr&) This retrieves the double precision value stored at addr&, assigning it to xx#. Very straightforward and it works for all data types. And unlike the old PEEK and POKE, it's just as fast as a pointer variable! Speaking of simplification, LOCAL, STATIC, GLOBAL, and RESET can now use a list of variables, like: STATIC abc, bcd, xyz AS STRING And, ARRAY ASSIGN lets you assign values to every element of an array in a single statement!
Even more ...
So simply put, one of our favorite slogans has been "We put the POWER in Basic..." We've said it before, but it's never been more true than it is today. With Classic PowerBASIC version 9, there's a renewed War On Bloatware! You know, using PowerBASIC for Windows, it's not unusual to deliver a substantial GUI application on a single floppy diskette. Don't let the Power of PowerBASIC pass you by...
New Features in Classic Version 9
Minimum System Requirements