Jump to content

PureBasic

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Short Circuit (talk | contribs) at 18:36, 27 July 2010 (External links: There's a wiki page for Rosetta Code on Wikipedia, so move part of link to intrawiki). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
PureBasic
File:PureBasic IDE.png
Paradigmstructured, imperative, procedural
Designed byFantaisie Software
DeveloperFantaisie Software
First appeared2000 (last revised 2010)
Stable release
v4.50 / June 7, 2010 (2010-06-07)
OSMicrosoft Windows, Linux, Mac OS X (active)
AmigaOS (discontinued, open source)
LicenseCommercial
Filename extensions.pb
Websitewww.purebasic.com
Influenced by
BASIC
The PureBasic Visual Designer, showing a selection of popular GUI components that it supports.

PureBasic is a commercial procedural computer programming language and integrated development environment based on BASIC and developed by Fantaisie Software for Windows (both 32 and 64-bit), Linux (also 32 and 64-bit) and Mac OS X. There is also a version available for the Amiga, although it has been discontinued and released as Open Source. The first public release of PureBasic was on December 17, 2000 and has been continually updated since.

PureBasic compiles directly to the x86, IA-32, 680x0 and PowerPC instruction sets, generating small standalone executables and DLLs which require no runtime libraries other than the standard system libraries. Programs developed without the use of the platform specific APIs can be built easily from the same source file with little or no modification.

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, enabling experienced programmers to improve the speed of speed-critical sections of their code.

PureBasic has an extensive set of over 1000 native commands and direct access to most OS API calls. The editor has full project support and the compiler is thread-safe with a powerful debugger that supports breakpoints with stepping mode, variable viewer and watcher, and other debugging features common to major BASIC products.

PureBasic supports and has integrated the OGRE 3D Environment. Other 3D environments such as iRRLicht and Dreamotion are unofficially supported.

Hello World example

The following single line of PureBasic code will create a 3.00 KB (3,072 bytes) standalone executable for Windows that displays a message box with the text "Hello World".

MessageRequester("Message Box", "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)