GetWiki
FreeBASIC
ARTICLE SUBJECTS
being →
database →
ethics →
fiction →
history →
internet →
language →
linux →
logic →
method →
news →
policy →
purpose →
religion →
science →
software →
truth →
unix →
wiki →
ARTICLE TYPES
essay →
feed →
help →
system →
wiki →
ARTICLE ORIGINS
critical →
forked →
imported →
original →
FreeBASIC
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{Short description|BASIC dialect}}{{Distinguish|Free Basics}}- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
factoids | |
---|---|
Compiler features
On its backend, FreeBASIC makes use of GNU Binutils in order to produce console and graphical user interface applications. FreeBASIC supports the linking and creation of C static and dynamic libraries and has limited support for C++ libraries. As a result, code compiled in FreeBASIC can be reused in most native development environments.While not an optimizing compiler, FreeBASIC can optionally transcompile to C to compile with optimizations. FreeBASIC supports inline assembly, multi-threading, and does not use automatic garbage collection.C style preprocessing, including multiline macros, conditional compiling and file inclusion, is supported. The preprocessor also has access to symbol information and compiler settings, such as the language dialect.Syntax
Initially, FreeBASIC emulated Microsoft QuickBASIC syntax as closely as possible. Beyond that, the language has continued its evolution. As a result, FreeBASIC combines several language dialects for maximum level of compatibility with QuickBASIC and full access to modern features.WEB, freeBASIC dialects,weblink coderJeff's home page, 5 February 2012, New features include support for concepts such as objects, operator overloading, function overloading, namespaces and others.WEB, Differences from QB,weblink freeBASIC.net documentation, 5 February 2012, Newline characters indicate the termination of programming statements. A programming statement can be distributed on multiple consecutive lines by using the underscore line continuation char (_), whereas multiple statements may be written on a single line by separating each statement with a colon (:).Block comments, as well as end-of-line remarks are supported. Full line comments are made with an apostrophe ', while blocks of commented code begin with /' and end with '/.FreeBASIC is not case-sensitive.Graphics library
FreeBASIC provides built-in, QuickBASIC compatible graphics support through FBgfx, which is automatically included into programs that make a call to the SCREEN command. Its backend defaults to OpenGL on Linux and DirectX on Microsoft Windows. This abstraction makes FBgfx graphics code cross-platform compatible. However, FBgfx is not hardware accelerated.Users familiar with external graphics utilities such as OpenGL or the Windows API can use them without interfering with the built-in graphics library.Language dialects
As FreeBASIC has evolved, changes have been made that required breaking older-styled syntax. In order to continue supporting programs written using the older syntax, FreeBASIC now supports the following dialects:- The default dialect (-lang fb as a command-line argument) supports all new compiler features and disallows archaic syntax.
- The FB-lite dialect (-lang fblite) permits use of most new, non-object-oriented features in addition to older-style programming. Implicit variables, suffixes, GOSUB / RETURN, numeric labels and other features are allowed in this dialect.
- The QB dialect (-lang qb) attempts to replicate QuickBASIC behavior and is able to compile many QuickBASIC programs without modification.
Example code
Standard programs, such as the "Hello, World!" program are done just as they were in QuickBASIC.Print "Hello, World!"sleep:end 'Comment, prevents the program window from closing instantlyFreeBASIC adds to this with support for object-oriented features such as methods, constructors, dynamic memory allocation, properties and temporary allocation.Type Vector
Private:
x As Integer
y As Integer
Public:
Declare Constructor (nX As Integer = 0, nY As Integer = 0)
Declare Property getX As Integer
Declare Property getY As Integer
End TypeConstructor Vector (nX As Integer, nY As Integer)
x As Integer
y As Integer
Public:
Declare Constructor (nX As Integer = 0, nY As Integer = 0)
Declare Property getX As Integer
Declare Property getY As Integer
x = nX
y = nY
End ConstructorProperty Vector.getX As Integer
y = nY
Return x
End PropertyProperty Vector.getY As Integer
Return y
End PropertyDim As Vector Ptr player = New Vector() - player = Type(100, 100)
References
{{reflist}}External links
{{Commons and category}}- {{Official website|www.freebasic.net}}
- {{github|freebasic/fbc|FreeBASIC}}
- {{sourceforge|fbc}}
- IDEs
- WinFBE - Modern FreeBASIC Editor for Windows
- VisualFBEditor - Cross-platform graphical IDE
- fbide.freebasic.net â FBIDE Integrated Development Environment for freeBASIC
- FBEdit (current) â FBEdit source code editor for FreeBASIC, version 1.0.7.6c
- {{sourceforge|fbedit|FBEdit source code editor for freeBASIC (outdated version: 1.0.6.8)}}
- content above as imported from Wikipedia
- "FreeBASIC" does not exist on GetWiki (yet)
- time: 8:37am EDT - Sat, May 18 2024
- "FreeBASIC" does not exist on GetWiki (yet)
- time: 8:37am EDT - Sat, May 18 2024
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 23 MAY 2022
The Illusion of Choice
Culture
Culture
GETWIKI 09 JUL 2019
Eastern Philosophy
History of Philosophy
History of Philosophy
GETWIKI 09 MAY 2016
GetMeta:About
GetWiki
GetWiki
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
Biographies
GETWIKI 20 AUG 2014
GetMeta:News
GetWiki
GetWiki
© 2024 M.R.M. PARROTT | ALL RIGHTS RESERVED