Xblite
Encyclopedia
XBLite is a free Open Source
BASIC
programming language compiler
and development system. It was started in 2001 by David Szafranski in order to provide a Windows
exclusive version of the XBasic
dialect. XBLite is released under the GNU GPL
licensing scheme, Standard libraries are released under the GNU LGPL
licensing scheme.
The XBLite syntax is very similar to that of XBasic and somewhat similar to Microsoft
's QuickBASIC
in that it is a procedural language capable of subs and functions. XBLite also has 64 bit integer data type, User Defined Types and the ability to have multiple modules in order to create GUI applications or games.
project that was to be exclusively a Microsoft Windows only programming language and environment. The first official release (version 1.0.0) was announced on October 2002, and subsequent versions were spread out amongst the last 6 years of development. Each release boasted both bug fixes and new features (to either the language itself and/or the different tools that are available with the XBLite project).
Today, version 2.4.0 is the current release of the compiler and version 1.30 of XSEd (The code editor). One of the latest projects is a visual GUI designer called viXen.
PROGRAM "hello"
CONSOLE
DECLARE FUNCTION Entry
FUNCTION Entry
a$ = INLINE$ ("Hello World!\n\n\n Press Enter to quit ")
END FUNCTION
END PROGRAM
PROGRAM "sayhello"
' interfaces to system DLLs
IMPORT "gdi32" ' importing interface to gdi32.dll
IMPORT "user32" ' importing interface to user32.dll
DECLARE FUNCTION Entry ' declare fonction Entry
FUNCTION Entry ' define (instanciate) fonction Entry
' display a message box and wait until the User clicks the 'OK!' button
MessageBoxA (0, &"Hello world!", &"Windows GUI Version", $$MB_OK)
END FUNCTION
END PROGRAM
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....
programming language compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
and development system. It was started in 2001 by David Szafranski in order to provide a Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
exclusive version of the XBasic
XBasic
XBasic is a variant of the BASIC programming language that was developed in the late 1980s for the Motorola 88000 CPU and Unix by Max Reason. In the early 1990s it was ported to Windows and Linux, and since 1999 it has been available as open source software with its runtime library under the LGPL...
dialect. XBLite is released under the GNU GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....
licensing scheme, Standard libraries are released under the GNU LGPL
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...
licensing scheme.
The XBLite syntax is very similar to that of XBasic and somewhat similar to Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's QuickBASIC
QuickBASIC
Microsoft QuickBASIC is an Integrated Development Environment and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on DOS, though there was a short-lived version for Mac OS...
in that it is a procedural language capable of subs and functions. XBLite also has 64 bit integer data type, User Defined Types and the ability to have multiple modules in order to create GUI applications or games.
XBLite History
XBLite is a project that was started back in 2001. The main idea was to create a language that was based on the XBasicXBasic
XBasic is a variant of the BASIC programming language that was developed in the late 1980s for the Motorola 88000 CPU and Unix by Max Reason. In the early 1990s it was ported to Windows and Linux, and since 1999 it has been available as open source software with its runtime library under the LGPL...
project that was to be exclusively a Microsoft Windows only programming language and environment. The first official release (version 1.0.0) was announced on October 2002, and subsequent versions were spread out amongst the last 6 years of development. Each release boasted both bug fixes and new features (to either the language itself and/or the different tools that are available with the XBLite project).
Today, version 2.4.0 is the current release of the compiler and version 1.30 of XSEd (The code editor). One of the latest projects is a visual GUI designer called viXen.
XBLite Development Specific Events
- A project called xpeeper is currently being developed by the XBLite team. This aims to give Peephole optimizationPeephole optimizationIn compiler theory, peephole optimization is a kind of optimization performed over a very small set of instructions in a segment of generated code. The set is called a "peephole" or a "window"...
technology to the XBLite project. The project has been distributed with XBLite since XBLite version 2.3.0. As well, XBLite is itself written in XBLite, making it a self hostingSelf-hostingThe term self-hosting was coined to refer to the use of a computer program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger...
compiler (it can compile itself). Since version 2.1.0, XBLite incorporates the M4 preprocessorM4 (computer language)m4 is a general purpose macro processor designed by Brian Kernighan and Dennis Ritchie. m4 is an extension of an earlier macro processor m3, written by Ritchie for the AP-3 minicomputer.-Use:...
tool.
- XSEd, the code editor available with XBLite was developed in XBLite. It is based on the ScintillaScintilla (editing component)Scintilla is a free library that provides text-editing functions, with an emphasis on advanced features for source code editing. SciTE , Notepad++ and Notepad2 are standalone editors based on Scintilla.-Features:...
project, a widely used editing component. XSEd is a full featured editor that allows to work with XBLite source code modules and allows to compile the code right from the editor.
- Open source project, viXen was originally created by John "prujohn" Evans, who released version 0.50a on July 22, 2006. It is a WYSIWYGWYSIWYGWYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...
screen designer and an XBLite generator: viXen allows to prototype a Windows GUI application before coding in XBLite the actual functions inside the generated skeleton. Currently, Guy Lonné develops and maintains the viXen project at SourceForge.
- XBLite working with the native Windows API, Callum Lowcay started the WinX project. It is a GUI library (WinX.dll) written in XBLite that "wraps" many of the most useful WinAPI calls. WinX simplifies coding Windows GUI applications in XBLite by providing an interface to the Windows widgets. WinX's applications can be first prototyped using viXen by just selecting the generation switch "Use WinX" prior the generation of the source code.
Components
XBLite comes with a complete set of components.- Compiler (can make executable files, libraries and dynamic linked libraries (DLL) files)
- ScintillaScintillaScintilla may refer to:*Scintilla , a fictional character in the Marvel Universe*Scintilla , an open-source code-editing component...
Code EditorSource code editorA source code editor is a text editor program designed specifically for editing source code of computer programs by programmers. It may be a standalone application or it may be built into an integrated development environment ....
XSEd - Resource Compiler
- Peephole optimizer xpeeper
- Graphical user interface builder viXen (Beta stage but very usable)
- GUI library WinX
Sample Code
Here is a classic example as it might be coded in XBLite.- Hello world programHello world programA "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...
in XBLite, console mode
PROGRAM "hello"
CONSOLE
DECLARE FUNCTION Entry
FUNCTION Entry
a$ = INLINE$ ("Hello World!\n\n\n Press Enter to quit ")
END FUNCTION
END PROGRAM
- Hello world programHello world programA "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...
in XBLite, Windows GUI mode
PROGRAM "sayhello"
' interfaces to system DLLs
IMPORT "gdi32" ' importing interface to gdi32.dll
IMPORT "user32" ' importing interface to user32.dll
DECLARE FUNCTION Entry ' declare fonction Entry
FUNCTION Entry ' define (instanciate) fonction Entry
' display a message box and wait until the User clicks the 'OK!' button
MessageBoxA (0, &"Hello world!", &"Windows GUI Version", $$MB_OK)
END FUNCTION
END PROGRAM