World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000060643
Reproduction Date:

Title: PureBasic  
Author: World Heritage Encyclopedia
Language: English
Subject: DarkBASIC, Blitz BASIC, Visual Basic, BASIC, PortAudio
Collection: Basic Compilers
Publisher: World Heritage Encyclopedia


Paradigm(s) structured, imperative, procedural
Family BASIC
Designed by Fantaisie Software
Developer Fantaisie Software
Appeared in 2000 (Windows), 1998 (AmigaOS)
Stable release 5.24 LTS / October 30, 2014 (2014-10-30)
Influenced by BASIC
OS cross-platform: Microsoft Windows, Linux, Mac OS X (active)
AmigaOS (discontinued, open source)
License commercial
Filename extension(s) .pb .pbi .pbf, .pbp, .pbv
Website .com.purebasicwww
The PureBasic Visual Designer, showing a selection of popular GUI components that it supports.

PureBasic is a commercially distributed procedural computer programming language and integrated development environment based on BASIC and developed by Fantaisie Software for Windows 32/64-bit, Linux 32/64-bit, and Mac OS X. An Amiga version is available, although it has been discontinued and released as open source. The first public release of PureBasic for Windows was on December 17, 2000. It has been continually updated since.

PureBasic has a "lifetime license model". As cited on the website, the very first PureBasic user (who registered in 1998) still has free access to new updates and this is not going to change.[1]

PureBasic compiles directly to x86, x86-64, PowerPC or 680x0 instruction sets, generating small standalone executables and DLLs which need no runtime libraries beyond the standard system libraries. Programs developed without using the platform-specific application programming interfaces (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 within PureBasic source code, while using the variables declared in PureBasic source code, enabling experienced programmers to improve the speed of speed-critical sections of code. PureBasic supports and has integrated the OGRE 3D Environment. Other 3D environments such as the Irrlicht Engine are unofficially supported.


  • Programming language 1
    • Characteristics 1.1
    • Hello World example 1.2
    • Procedural programming 1.3
    • Object-oriented programming 1.4
  • Form Designer RAD 2
  • User community 3
  • Further reading 4
  • Bibliography 5
  • References 6
  • External links 7

Programming language


PureBasic is a native 32 bit and 64 bit BASIC compiler. The code is highly portable. Currently supported systems are Windows, Linux, Mac OS X the AmigaOS version is now legacy and open-source. The compiler produces very fast and highly optimized executables and the syntax of PureBasic is simple and straightforward.[2] It can compile console applications,[3] gui applications,[4] and dll files.[5]

Hello World example

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

MessageRequester("Message Box", "Hello World")

And the following variant of the same code, which instead uses an inline Windows API call with no 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", "Message Box", 0)

The following is a console version of the Hello World example.

OpenConsole()          ; Open a console window. 
Print("Hello, World!") 

Procedural programming

PureBasic is a "Second generation BASIC" language, with structured conditionals and loops, and procedure-oriented programming supported. The user is not required to use procedures, so a programmer may opt for a coding style which includes Goto, Gosub Label, and Return.

Below is a sample procedure for sorting an array, although SortArray is now a built-in function of PureBasic.

 Procedure bubbleSort(Array a(1))
   Protected i, itemCount, hasChanged
   itemCount = ArraySize(a())
     hasChanged = #False
     itemCount - 1
     For i = 0 To itemCount
       If a(i) > a(i + 1)
         Swap a(i), a(i + 1)
         hasChanged = #True
   Until hasChanged = #False

Object-oriented programming

Fred, the developer of PureBasic, has stated that PureBasic will never be object oriented.[6] However, numerous users have created object oriented support systems.[7][8][9]

Form Designer RAD

PureBasic has its own form designer to aid in the creation of forms for applications, but other third-party solutions are also available.[10][11][12] The original non-integrated Visual Designer was replaced with a new integrated Form Designer on 14 Feb, 2013.[13]

User community

PureBasic provides an online forum for users to ask questions and share knowledge. On 6 May 2013 the English language forum had 4,769 members and contained 44,043 threads comprising 372,200 posts since May 17, 2002.[14]

Numerous code sharing sites show PureBasic is used to create tools[15][16] and games in a fast and easy way,[17] and share large amounts of open-source code.[18]

Further reading

  • Willoughby, Gary (2006). Purebasic: A Beginner s Guide to Computer Programming.  
  • Logsdon, John. Programming 2D Scrolling Games. This book is now freely downloadable
  • Basic Compilers: QuickBASIC, PureBasic, PowerBASIC, Blitz Basic, XBasic, Turbo Basic, Visual Basic, FutureBASIC, REALbasic, FreeBASIC.  


  • Hale Light, Michael (2010). Malware Analysts Cookbook Tools for Thwarting Malicious Attacks. Indianapolis, IN: John Wiley & Sons Inc. p. 241.  
  • Galbreath, Nick (2002). Cryptography for Internet and database applications : developing secret and public key techniques with Java. Indianapolis, Ind.: Wiley. p. 300.  
  • "Learning to Crack Code".  
  • Georges, Philippe. "La programmation avec PureBasic". PROgrammez (141). 
  • Svoboda, Luboš (2012). Překvapivý PureBasic (Surprising PureBasic: A Czech ebook for prospective users of PureBasic). p. 89. 


  1. ^ FAQ, lifetime licence details
  2. ^ [1], PureBasic home page
  3. ^ [2], PureBasic - Console
  4. ^ [3], PureBasic - Gadget
  5. ^ [4], Building a DLL
  6. ^ [5], PureBasic won't be object oriented
  7. ^ [6], PureObject - PureBasic OOP support
  8. ^ [7], OOP tutorial
  9. ^ [8], Another OOP PreCompiler
  10. ^ PureVision, Professional form design for PureBASIC.
  11. ^ ProGUI>, DLL library comprising more than 100 well documented commands to quickly incorporate rich, customizable GUI components into your applications.
  12. ^ PureFORM, Freeware form designer.
  13. ^ [9], PureBasic 5.10 is released
  14. ^ English forum, Official forum.
  15. ^ Gnozal's Purebasic place, PureFORM and jaPBe alternative editor
  16. ^ Horst Schaeffer's Software Pages
  17. ^ PureArea, PureArea
  18. ^ CodeArchiv, Andre Beer's code archive.

External links

  • Official website
  • PureBasic at DMOZ
Libraries and Open Source Code Archives
  • Gnozal's Purebasic place (IDE Plugins & Libraries)
  • Andre Beer's Open Source PB code archive
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.