Introduction
Projects
Language
Messages
Functions
Advanced
Getting Started
PowerBASIC 9 provides the ability to create Windows programs using the familiar statements
and syntax of traditional BASIC languages, but it includes significant extensions which
take its capabilities far beyond the original scope of BASIC programming. It can create
executables (EXEs) as well as dynamic link libraries (DLLs).
It's lack of runtime files, high performance, and small EXE/DLL footprints have made PowerBASIC a popular language. Programmers of other languages often turn to PowerBASIC to create high-performance DLLs for use in applications written in other languages.
A Simple Program
PowerBASIC programs are simply text files (usually with a .bas extension) consisting of
source code statements. These files are typically created using the PowerBASIC Integrated
Development Environment - a customized text editor and compiler.
Just to get you started, here's a quick look at a traditional "Hello World" program. In PowerBASIC execution begins with the code found in the PBMAIN() function and ends when it executes the last line of code in that function. In this example, there's just a single line of code which pops up a message box with a button and the text "Hello World". Once the button is pressed the message box disappears and the PowerBASIC program ends.
#COMPILE EXE 'directs compiler to create EXE FUNCTION PBMAIN () AS LONG MSGBOX "Hello World" END FUNCTION
The resulting, standalone EXE is a complete standard Windows program and is only 6KB in size. PowerBASIC programs can use all the standard features of a Windows program - forms, menus, and the complete set of standard Windows controls (textbox, labels, ... , etc.).
If you have any suggestions for additions to these tutorials, please let me know.