Thu . 19 Aug 2019
TR | RU | UK | KK | BE |


power basic,
PowerBASIC, formerly Turbo Basic, is the brand of several commercial compilers by PowerBASIC Inc that compile a dialect of the BASIC programming language There are both DOS and Windows versions, and two kinds of the latter: Console and Windows The DOS version has a syntax similar to that of QBasic and QuickBASIC The Windows versions use a BASIC syntax expanded to include many Windows functions, and the statements can be combined with calls to the Windows API


  • 1 History
  • 2 Compilers
    • 21 Turbo Basic
      • 211 Code example
    • 22 PowerBASIC for DOS PBDos
    • 23 PowerBASIC Console Compiler PBCC
    • 24 PowerBASIC Compiler for Windows PBWin
      • 241 Dynamic Dialog Tools DDT
      • 242 Trial Versions of Compilers
  • 3 Tools
    • 31 PB Forms
    • 32 COM Browser
  • 4 Programming language
    • 41 Characteristics
    • 42 Hello World
    • 43 Object-oriented programming
      • 431 Graphics
        • 4311 Elements of the GRAPHIC statements
        • 4312 Creating a GRAPHIC WINDOW application
        • 4313 Comparison of PB GRAPHIC statements with the GDI API
        • 4314 Complementarity of GRAPHIC statements and the Windows GDI API
  • 5 User community
  • 6 Third-party support
  • 7 References
  • 8 External links


The first version of the DOS compiler was published as BASIC/Z, the very first interactive compiler for CP/M and MDOS Later it was extended to MS-DOS/PC DOS and in 1987 Borland distributed it as Turbo Basic

Turbo Basic 11 1987 startup screen

Turbo Basic was originally created by Robert "Bob" Zale 1945–2012 and bought from him by Borland When Borland decided to stop publishing it 1989, Zale bought it back from them, renamed it to PowerBASIC and set up PowerBASIC Inc to continue support and development of it; it was later called PBDOS234

PowerBASIC went on to develop Basic compilers for Windows, first PBWIN — their flagship product — then PBCC, described below

On November 6, 2012, Robert Zale, the creator of PowerBASIC, died For a time, it was assumed that the company might cease operations His wife, Mrs Vivian Zale, posted on 8 March 2014 to the PowerBASIC forums a statement that the company would continue in operation5 On 10 May, 2015, Mrs Zale announced that work was continuing on new versions of PowerBASIC compilers6

On November 2, 2016, Vivian Zale announced her intention to begin seeking a buyer for the company The active development of the next generation of PowerBASIC products is now stopped and they no longer expect to release PBWin11/PBCC7, which were already in beta testing when Bob Zale died, nor the 64-bit compilers or PB/Pro PBWin and CC in one compiler which were still in the alpha stages


PowerBASIC programs are self-contained and use no runtime file to execute In all versions of the compiler the applications compile without external libraries, though you can use such libraries if desired PBDOS creates 16-bit DOS MZ executable files, while PBWIN and PBCC create 32-bit Portable executable PE files

Turbo Basicedit

Borland's Turbo Basic contains extensions to classical Basic while not breaking compatibility One of those was a drawing API, and mouse access

Unlike most BASIC implementations of this period, Turbo Basic was a full compiler which generated native code for MS-DOS Other implementations were either interpreters, or relied heavily on a runtime library The integrated development environment could run a BASIC program internally for traditional BASIC debugging see sample below, or generate an MS-DOS stand-alone executable file that could be run on other systems without the Turbo Basic product or runtime libraries

Code exampleedit

The following program is an example of the ALGOL-like BASIC dialect that Turbo Basic supported Unlike traditional BASIC, which used line numbers and had limited control structures and no support for ALGOL-like subroutines, modern BASIC dialects starting at this period were extended to make the language compatible with modern structured programming theory by discarding the line numbers and adding the control structures and subroutine definitions needed by structured programming

INPUT "What is your name: ", n$ PRINT "Hello "; n$ DO s$ = "" INPUT "How many stars do you want to print"; s FOR i = 1 TO s s$ = s$ + "" NEXT i PRINT s$ DO INPUT "Do you want to print more stars"; q$ LOOP WHILE LENq$ = 0 q$ = LCASE$LEFT$q$, 1 LOOP WHILE q$ = "y" PRINT "Goodbye "; n$

Note that s$ is a string and s is a single precision floating-point number They are separate variables

Like the other Borland products of this era, the code executes within the integrated development environment

PowerBASIC for DOS PBDosedit

PBDOS includes an Integrated Development Environment IDE and supports DOS 330 and all later versions7

PowerBASIC Console Compiler PBCCedit

PBCC is a 32-bit compiler for the Windows 9x series and Windows NT series of operating systems, including Windows XP, Windows Server 2008, Windows Vista, and Windows 7 PBCC applications can use Dynamic Link Libraries DLL The compiler comes with an IDE including an editor and stepping debugger

No knowledge of Windows programming is required to create character mode or graphical applications with this compiler Common Gateway Interface executables can also be compiled using PBCC

PBCC creates only executables, not DLLs PBWin — see below — can create both

PowerBASIC Compiler for Windows PBWinedit

PBWin is a 32-bit compiler compatible with the Windows 9x series and the Windows NT series of operating systems, including Windows XP, Windows Server 2008, Windows Vista, and Windows 78 PBWin can create Dynamic Link Libraries PBWin applications can read Dynamic Link Libraries PBWin comes with a compiler, IDE including an editor and stepping debugger

Dynamic Dialog Tools DDTedit

You can create an application's Graphical user interface using the Windows API, or by using the inbuilt DDT language extensions The group of BASIC statements which wrap Windows API functions, particularly in the creation and handling of dialog boxes and child controls is collectively known as Dynamic Dialog Tools Using DDT requires less coding than to create a similar program using the Windows API Using the DDT and the Windows API known as SDK style as in Microsoft Windows SDK are not mutually exclusive

Trial Versions of Compilersedit

PowerBASIC renamed PBWin v907 and PB/CC v507 as "Classic PBWin" and "Classic PB/CC", respectively, and on November 1, 2016, released them as free, no-nag, trial versions along with PBForms v10 PowerBASIC Forms


PB Formsedit

PowerBASIC Forms, available for purchase separately, is a graphical user interface design tool add-on for PBWin It automatically produces source code using the DDT language extension that creates forms using the Windows graphical user interface

COM Browseredit

The PowerBASIC COM Browser, which comes with PBWin, is an application that exposes the interfaces, methods, and properties of COM objects, as described by type-library files The PowerBASIC COM Browser exports an interface structure of a COM object for early-binding purposes in PowerBASIC code, and gives syntax reference and context-help on the interface members exposed by a COM object9

Programming languageedit


PowerBASIC is a native-code BASIC compiler whose reported merits are simplicity of use and speed compared to other languages1011 Although the compiled code is fast enough for most purposes, the compilers also support inline assembler for additional code optimizing The Windows compilers PBWin & PBCC support almost all of the x86 instruction set, including FPU, SIMD and MMX, the main exceptions being a few which are useful mostly to systems programmers One can still use the unsupported instructions by inserting their opcodes with the "db", "dw" and "dd" statements Lines of assembler code can be freely interspersed with lines of BASIC code, although one must always consider the potential interactions between the two types of code

Hello Worldedit

Hello world is used to give a very small example of the syntax used by a programming language and is often the smallest possible program for any given programming language

Here is an example of a PBCC hello world program By default PBCC creates a console window at run time for displaying output The only purpose of Waitkey$ in this example is to keep the console up so you can read the output

Function PBMain Print "Hello, World!" Waitkey$ End Function

Here is the PBWin version, which displays a Windows "dialog" message box

Function PBMain MsgBox "Hello, World!" End Function

Object-oriented programmingedit

PBWin and PBCC support Object-Oriented Programming in the form of COM classes, however the compilers do not force you to use OOP, it is merely an option In-process and out-of-process COM Servers can also be built using these compilers


Both the Console Compiler and Windows Compiler can create graphic windows The GRAPHICs statements are higher-level than Windows' Graphics Device InterfaceGDI library functions1213

Elements of the GRAPHIC statementsedit

GRAPHIC WINDOWS are dedicated dialogs each containing a single control which fills the dialog's client area GRAPHIC controls are child windows which support the same GRAPHIC drawing functionality as GRAPHIC windows GRAPHIC BITMAPS are also defined, again supporting the GRAPHIC drawing functionality, but as purely memory objects, like Windows Bitmaps or DIB Sections Keyboard and mouse handling statements are included among the GRAPHIC statements Character output to a GRAPHIC target uses fonts specified via the FONT NEW statement

Creating a GRAPHIC WINDOW applicationedit

A GRAPHIC WINDOW is the equivalent of a Windows dialog box containing a static control on which drawing operations can be done A single BASIC statement will create a GRAPHIC WINDOW and specify its size, position and title It is not essential to specify a WNDPROC for the GRAPHIC WINDOW A short source code example for a complete GRAPHIC WINDOW application follows:

#Compile Exe ' using either PBCC6 or PBWIN10 compiler #Dim All Function PBMain Local GW As Dword ' start a GRAPHIC WINDOW Graphic Window New "graphic window", 100, 100, 200, 200 to GW ' show a coloured disc Graphic Ellipse 10, 10-190, 190, %rgb_Red, %rgb_SeaGreen, 0 ' wait for a keypress Graphic Waitkey$ End Function Comparison of PB GRAPHIC statements with the GDI APIedit

Using PB GRAPHIC statements, a GRAPHIC WINDOW, BITMAP or control is first selected as the current GRAPHIC target, then operations are done on it without requiring it to be identified again Contrast this with the GDI API approach, where the Device Context handle is required for every drawing operation

It is not necessary when using the PB GRAPHIC statements to define a brush or pen as a separate entity, nor is it necessary to redraw the GRAPHIC target when in view in response to Windows messages such as WM_PAINT and WM_ERASEBKGND GRAPHIC targets are persistent

When GRAPHIC targets are attached, a REDRAW option can be specified which buffers the results of drawing operations until they are specifically requested Using this technique reduces flicker in a similar way to the technique of drawing on memory DCs 14 when using the GDI API

Pixel operations are possible using the GRAPHIC GET|SET PIXEL statements, in a manner similar to GetPixel/SetPixel of the GDI API GRAPHIC GET BITS allows the entire bitmap to be loaded into a dynamic string This can be manipulated either as a string or by mapping an array onto it It can be placed back into the GRAPHIC target by GRAPHIC SET BITS

Complementarity of GRAPHIC statements and the Windows GDI APIedit

The GRAPHIC statements contain all the commonly used GDI API functions, but if you need one that is not included it is possible to obtain the hDC of any GRAPHIC target and thereby use GDI API functions on it

User communityedit

PowerBASIC provides an online forum for users to ask questions and share knowledge15 On 8 July 2012 the forum had 5,623 members only a fraction of them still active and contained 50,093 threads comprising 408,642 posts since August 26, 1998 The Source Code section alone contained 3,768 threads16

Third-party supportedit

  • Perfect Sync
  • Computer Workshop EZGUI
  • José Roca Software
  • PlanetSquires Software


  1. ^ Release of PowerBASIC 100 Compiler for Windows
  2. ^ "PowerBASIC makes smooth move; Tech company finds region's affordability attractive" Sarasota Herald Tribune October , 2000 2000-10-10 Retrieved 2008-03-12 
  3. ^ Michael H Tooley 2005 PC Based Instrumentation and Control Elsevier p 214 ISBN 0-7506-4716-7 
  4. ^ http://wwwpowerbasiccom/aboutpbasp
  5. ^ Zale, Vivian "PowerBASIC Update" PowerBASIC Forums PowerBASIC Retrieved 5 July 2015 
  6. ^ Eccles, John "PowerBASIC Plans" PowerBASIC Forums PowerBASIC, Inc Retrieved 5 July 2015 
  7. ^ PowerBASIC 35 for DOS
  8. ^ PowerBASIC Compiler for Windows
  9. ^ "Com Browser on PowerBASIC's website" 
  10. ^ New geometries for new materials, Eric A Lord, Alan Lindsay Mackay, Srinivasa Ranganathan, Cambridge University Press, 2006, ISBN 0-521-86104-7 "a very simple user interface speed and power of the underlying C++ runs extremely fast" Google Books
  11. ^ Chaos and Time-series Analysis, Julien C Sprott, Oxford University Press, 2003, ISBN 0-19-850840-9 "easy to learn, powerful, and as fast as any C compiler I have encountered" Google Books
  12. ^ http://wwwpowerbasiccom/support/help/pbwin/indexhtm
  13. ^ http://wwwpowerbasiccom/support/help/pbcc/indexhtm
  14. ^ Petzold, Charles 1998 Programming Windows Fifth Edition, Microsoft Press, ISBN 978-1-57231-995-0
  15. ^ http://wwwpowerbasiccom/support/pbforums/faqphpfaq=vb3_board_faq#faq_faq_forum_rules
  16. ^ PowerBASIC's vBulletin forum software statistics

External linksedit

  • PowerBASIC company website
  • PowerBasic Support Forums
  • Börje Hagsten’s Files
  • Don Dickinson’s PowerBASIC code
  • Gary Beene’s gbSnippets
  • FreeBase's Page on PowerBASIC
  • TheirCorp's PowerBASIC projects on SourceForge
  • Books on Internet Archive:
    • Using Turbo Basic : Frederick E Mosher & David I Schneider : Free Download & Streaming : Internet Archive
    • borland :: Borland Turbo BASIC Owners Handbook 1987 : Free Download & Streaming : Internet Archive
  • Borland Turbo Basic 1x - Stats, Downloads and Screenshots :: WinWorld - Abandonware and Pre-Release Software

power basic, power basic barcode printing, power basic download, power basic examples, power basic for dos, power basic forum, power basic time clock, power basics curriculum,,

PowerBASIC Information about


  • user icon

    PowerBASIC beatiful post thanks!


PowerBASIC viewing the topic.
PowerBASIC what, PowerBASIC who, PowerBASIC explanation

There are excerpts from wikipedia on this article and video

Random Posts

The San Francisco Examiner

The San Francisco Examiner

The San Francisco Examiner is a longtime daily newspaper distributed in and around San Francisco, Ca...
Frederator Films

Frederator Films

Frederator Films is an animation studio founded by Fred Seibert as part of Frederator Studios, with ...
John Hasbrouck Van Vleck

John Hasbrouck Van Vleck

John Hasbrouck Van Vleck March 13, 1899 – October 27, 1980 was an American physicist and mathematici...
Christian Lacroix

Christian Lacroix

Christian Marie Marc Lacroix French pronunciation: ​kʁistjɑ̃ lakʁwa; born 16 May 1951 is a Fren...

Random Posts (



H.261 is a video compression standard. It was adopted in 1990 by the international organization ITU.
Troitsky District (Altai Territory)

Troitsky District (Altai Territory)

Russia Russia Status Municipal district Included in the Altai Territory and the Administrative Ce
ATR 42

ATR 42

ATR 42 is a passenger twin-engine turboprop aircraft for medium-haul flights. Manufacturer - French-


Belivtsi is the name of several localities: Belivtsi is a village in the Vyazemsky district of the