PureBasic

From Wikipedia, the free encyclopedia

PureBasic
Developed by Fantaisie Software
Latest release v4.20 / 2008
OS Mac OS X (PowerPC only), Microsoft Windows, Linux, AmigaOS
Genre Programming
License Proprietary
Website [1]
The PureBasic Visual Designer, showing a selection of popular GUI components that it supports.
The PureBasic Visual Designer, showing a selection of popular GUI components that it supports.

PureBasic is an event-driven BASIC programming language for Windows, Linux, Mac OS X (PowerPC only), and AmigaOS, developed by Fantaisie Software.

Programs written in PureBasic compile directly to the IA-32, 680x0 and PowerPC instruction sets, generating small standalone executables and DLLs. If OS specific APIs are not used, all supported targets can be built from the same source file with little or no modification. PureBasic executables are compiled instead of interpreted and require no runtime libraries be installed on the end-user's computer (avoiding DLL Hell). PureBasic also runs on all 32 bits Windows versions (Windows NT, Windows 95, and later).

PureBasic supports inline assembly, allowing the developer to include FASM assembler commands directly within the PureBasic source code, while using the variables declared in PureBasic source code. Experienced programmers can thus improve the speed of time-critical sections of their code.

PureBasic has an extensive set of over 800 commands and direct access to many OS API calls.

PureBasic supports, and has integrated the OGRE 3D Environment. Other 3D Environments and libraries have been used including (but not limited to,) iRRLicht, and Dreamotion.

[edit] Example programs

The following single line of PureBasic code will create a 3.00 KB (3,072 bytes) standalone executable for Windows.

MessageRequester("","Hello World")

And the following variation of the same code, which instead uses an inline Win32 API call without the need for declarations or other external references, will create an even smaller 2.00 KB (2,048 bytes) standalone executable for Windows.

MessageBox_(0,"Hello World","",0)

Lastly, the screenshot at the right shows a short example of a Windows PureBasic program. Whatever the user types into the two boxes, their sum is displayed to the right of them. It demonstrates how a window is created, items added, and events and simple mathematics performed. This code compiles into a 14.5 KB (14,848 bytes) standalone executable for Windows.

The PureBasic IDE, showing an example program.
The PureBasic IDE, showing an example program.

[edit] Selected milestones

December 17, 2000

PureBasic v2.00 for Windows is released, marking the first non-beta version available to the public.

May 8, 2006

PureBasic v4.00 for Windows is released and has undergone its most important upgrade ever: colors for all gadgets, faster file operations due to buffering, Unicode support, UDP network support, unlimited-length strings, fixed-length strings, thread-safety, 'EnableExplicit' command to prevent mistyped variable names (equivalent to 'Option Explicit' in Visual Basic), new data types of Characters, Doubles and Quads, Xor and Not operators, macros, multiple 'Case' selection (eg. 1 To 5), a new 'Process' library for manipulating system processes, an updated OGRE game engine, and much more. In addition, a brand-new GUI form designer is currently underway.

July 28, 2006

The first tutorial book specifically for PureBasic v4.00 is published: Purebasic - A Beginner's Guide To Computer Programming

December 10, 2006

PureBasic v4.00 for Amiga is released as open source due to no longer being officially supported.

April 15, 2007

PureBasic v4.00 for Linux is released.

November 4, 2007

PureBasic v4.10 is released, and is the first version of PureBasic that is equal for Windows, Linux, and Mac OS X.

May, 23, 2008

PureBasic v4.20 is released and has several major additions which bring it even closer to other industry-standard Basics. They are (amongst other things and the usual bug fixes): mail and ftp support, regular expression support, SQLite support, a built-in profiler to find bottlenecks in your code, display of variable values when the mouse is hovered over them, and up to 8 times faster compilation over previous releases.

[edit] External links