From Seo Wiki - Search Engine Optimization and Programming Languages
FreeBASIC allows a high level of support for programs written for QBasic, by using the "QB" dialect. Many programs written for QBasic will compile and run in this mode without any changes needed. However, most substantial programs will need changes to be made before they can be compiled using the default dialect.
FB is a game site founded in november 2009. 
FreeBASIC syntax attempts to stay as close to the BASIC syntax as possible, specifically that of QuickBASIC. Although the syntax attempts to stay compatible with its predecessor, FreeBASIC follows modern standards and coding practices. Standard procedural features, along with object oriented features such as types as objects, operator overloading, function overloading, namespaces, etc., have been added in FreeBASIC.
FreeBASIC's lines end when the end-of-line characters are found, or with a colon. Because of this, lines don't have to have a special character (such as the semicolon in C) to notify the compiler of the end of line. Multiple statements may be written on one line by separating each statement with a colon
FreeBASIC is a successor to the QuickBASIC programming language. Changes were made during development to keep FreeBASIC compatible with modern utilities, and facilitate advanced programming features. In order to keep the compiler moving forward, GCC compliant, and to also retain the ability to use a QuickBASIC compatible language, the -lang option set was created.
- When choosing Language Set FB (-lang fb as a command-line argument), all of the new features that FreeBASIC offers are available, and the "hackish" features from QuickBASIC (that were incompatible with modern programming practices) are disallowed.
- Language Set FB-Lite (-lang fblite) provides access to most of the new, non-object-oriented features of FreeBASIC, but allows a coding style similar to that of older versions of BASIC. Syntax rules, such as allowing implicit variables, suffixes,
RETURN, numeric labels, etc., are permitted in this lang option.
- Language Set QB (-lang qb) is similar to -lang fblite, but is more focused on specifically replicating QBASIC-like behavior. -lang qb is designed to make it easier to run programs originally written for QBASIC, and is useful in cases where -lang fblite is not compatible enough.
As in QBasic, a program to write a line of text to the screen can be done with a simple statement:
print "Hello, World!"
/'A Vector motion class'/ Type Vector W as Integer H as Integer Declare Constructor (nW as Integer, nH as Integer) End Type Constructor Vector (nW as Integer, nH as Integer) W = nW H = nH End Constructor /'Create an object class'/ Type Object Private: X as Integer Y as Integer Movement as Vector Pointer Public: /'Create public methods, including a destructor for automated cleanup'/ Declare Constructor (nX as Integer, nY as Integer) Declare Destructor () Declare Sub SetMotion (Motion as Vector Pointer) Declare Sub Move () Declare Property GetX as Integer End Type /'Set initial coordinates'/ Constructor Object (nX as Integer, nY as Integer) X = nX Y = nY End Constructor /'Clean up allocated memory'/ Destructor Object () delete Movement End Destructor /'Set the motion Vector'/ Sub Object.SetMotion (Motion as Vector Pointer) Movement = Motion End Sub /'Move the object based on its motion Vector'/ Sub Object.Move () X += Movement->W Y += Movement->H End Sub /'A getter for X, as it's private'/ Property Object.GetX as Integer Return X End Property /'MAIN CODE'/ /'Create a new instance of Object at coordinates 100, 100'/ Dim Player as Object = Type<Object>(100, 100) /'Dynamically allocate a new Vector object moving left 10 units and down 5'/ Player.SetMotion(new Vector (-10, 5)) /'Make the Player update its location'/ Player.Move() /'Display new X, 90'/ Print Player.GetX /'Because Player is a local variable, it's destructor is called at the end of scope automatically'/
FreeBASIC has a built-in 2D, software graphics library to be QuickBASIC compatible, which provides the user with simple graphics primitives (such as rectangles, lines, and circles), blitting, and additional features which weren't present in QuickBASIC's graphical library. The library itself is not OS dependent, so code is portable across platforms with the library.
Although the library is built-in, it is only included if one chooses to use it, which is done simply by including a call to the FBgfx Screen command. Common libraries such as OpenGL + Creating a Window with your API (Windows, Linux, Etc.) for hardware acceleration can be used without interfering with the FreeBASIC graphics library.
FreeBASIC continues to make development progress toward its goal of being a GCC front-end, which would allow many features found in C++ and other object-oriented programming languages, portability to nearly any modern system, and advanced optimization techniques.
- ↑ 1.0 1.1 Lee Seats. "FreeBASIC the Successor to QuickBASIC". About.com. http://freebies.about.com/od/computerfreebies/qt/freebasic.htm. Retrieved 2008-08-17.
- ↑ www.fb-games.de
- ↑ "FreeBASIC Todo List on Sourceforge". http://fbc.svn.sourceforge.net/viewvc/fbc/trunk/FreeBASIC/src/compiler/TODO.txt?view=markup. Retrieved 2007-07-31.
- ↑ "SourceForge.net: 2007 Community Choice Awards". http://sourceforge.net/community/index.php/landing-pages/cca07/. Retrieved 2008-12-31.
- Official website
- Official forum
- SourceForge homepage
- FreeBASIC Documentation in Wiki Format
- FreeBasic package for RPM-based distributions
- FreeBasic packages for DEB-based distributions