PureBasic
From Wikipedia, the free encyclopedia
PureBasic | |
Developer: | Fantaisie Software |
---|---|
Latest release: | 2006 Release 4 / 2006 |
OS: | Mac OS X, Microsoft Windows, Linux, AmigaOS |
Use: | Programming |
License: | Commercial |
Website: | [1] |
PureBasic is a BASIC derivative for Windows, Linux, Mac OS X 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 rather than interpreted and thus require no runtime libraries be installed on the end-user's computer, simplifiying deployment of packaged solutions and avoiding DLL Hell problems that affect some other BASIC languages. The Windows version is fully compatible with all versions of Windows since Windows 95.
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. The programmer thus has the ability to optimize time-critical parts of his code to his skill level.
PureBasic has an extensive set of over 800 commands, in addition to direct access to the API commands of Windows, Linux or Mac OS. Libraries include:
- General Libraries
-
- 2D Drawing, CDAudio, Cipher, Clipboard, Console, Database, Date, Desktop, File, FileSystem, Font,
- Gadget, Help, Image, ImagePlugin, Library, Linked List, Math, Memory, Menu, Misc, Movie, Network,
- OnError, Packer, Preference, Process, Printer, Requester, Sort, StatusBar, String, SysTray, Thread,
- Toolbar, Window
- 2D Games Libraries
-
- Joystick, Keyboard, Module, Mouse, Palette, Sprite & Screen, Sprite3D, Sound, SoundPlugin
- 3D Games Libraries
-
- Engine3D, Billboard, Camera, Entity, Light, Material, Mesh, Particle, Terrain, Texture
[edit] Example programs
The following single line of PureBasic code will create a tiny 3.00 KB (3,072 bytes) standalone executable for Windows. This example is present for comparison to other BASIC languages on Wikipedia which also present their own version of this code.
MessageRequester("","Hello World")
And the following is a short but perfectly functional example of a 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 which can be run on any Windows PC from Windows 95 to Windows 2003 Server without any runtime needed.
OpenWindow(1,300,300,100,100,"Title",#PB_Window_SystemMenu) CreateGadgetList(WindowID(1)) StringGadget(1,10,10,50,20,"") StringGadget(2,10,40,50,20,"") TextGadget(3,80,30,50,20,"") Repeat ev=WaitWindowEvent() If ev=#PB_Event_Gadget op1=Val(GetGadgetText(1)) op2=Val(GetGadgetText(2)) SetGadgetText(3,Str(op1+op2)) EndIf Until ev=#PB_Event_CloseWindow End
[edit] Selected milestones
December 17, 2000
- PureBasic v2.00 (final) for Windows is released, marking the first ever non-beta version available to the public.
February 4, 2006
- PureBasic undergoes its most important upgrade ever: version 4.00 Beta 1 is publicly released. This version brought a new maturity to the language by adding much-requested features such as: 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, new data types of Characters/Doubles/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 underway (see image above).
May 8, 2006
- PureBasic v4.00 (final) for Windows is released, giving the major improvements mentioned above to the general public.
July 28, 2006
- The first tutorial book specifically for PureBasic v4.00 is published: Purebasic - A Beginner's Guide To Computer Programming
Oct 25, 2006
- PureBasic v4.00 (beta) for Linux is released, bringing it closer in line to the Windows version.
Dec 10, 2006
- PureBasic v4.00 for Amiga is released with open source.
[edit] External links
- PureBasic home page
- Belgian PureBasic Visual Designer home page
- German PureBasic home page
- English PureBasic discussion and support forum
- PureBasic Survival Guide (excellent tutorials)
- PureBasic source code repository and archive
- PureVision: A third-party commercial GUI form designer
- Flat Assembler
- A typical German PureBasic fan site
- A PureBasic fan site with many tools and libraries, also jaPBe V3 homepage
- A German PureBasic developer archive
- Another German site with PureBasic programs
- Interview with Fred "AlphaSND" Laboureur
- Alternative German PureBasic forum with a lot of events and contests