Revision history for CompilerFAQ


Revision [21989]

Last edited on 2017-11-21 01:10:35 by JeffMarshall [fix page link name case]
Additions:
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib|#Inclib]]## or on the compiler command line with ##[[CompilerOptl|-l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there. For general information on libraries and how to use them see [[ProPgPrebuiltLibraries|Using Prebuilt Libraries]] and the related pages listed there.
Deletions:
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib|#Inclib]]## or on the compiler command line with ##[[CompilerOptL|-l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there. For general information on libraries and how to use them see [[ProPgPrebuiltLibraries|Using Prebuilt Libraries]] and the related pages listed there.


Revision [21983]

Edited on 2017-11-16 09:06:57 by St_W [add missing back to top]

No Differences

Revision [21981]

Edited on 2017-11-16 08:51:19 by St_W [more information on library errors]
Additions:
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib|#Inclib]]## or on the compiler command line with ##[[CompilerOptL|-l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there. For general information on libraries and how to use them see [[ProPgPrebuiltLibraries|Using Prebuilt Libraries]] and the related pages listed there.
Deletions:
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib|#Inclib]]## or on the compiler command line with ##[[CompilerOptL|-l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there.


Revision [21796]

Edited on 2017-07-29 02:43:54 by fxm [Cited the acronym RTTI]
Additions:
""FreeBASIC"" (since version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and Run-Time Type Information (RTTI). Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects|A Beginners Guide to Types as Objects]].
Deletions:
""FreeBASIC"" (since version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects|A Beginners Guide to Types as Objects]].


Revision [20752]

Edited on 2016-03-12 10:55:40 by fxm [Formatting]

No Differences

Revision [20724]

Edited on 2016-02-26 10:32:15 by DkLwikki [Mention 64bit and ARM support]
Additions:
- It supports 32-bit and 64-bit processors, where ""QBasic"" is designed for 16-bit CPU's.
Deletions:
- It supports 32-bit processors, where ""QBasic"" is designed for 16-bit CPU's.


Revision [20723]

Edited on 2016-02-26 10:31:06 by DkLwikki [Mention 64bit and ARM support]
Additions:
""FreeBASIC"" is a free, BASIC compiler for Windows (32-bit and 64-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86, x86_64, and ARM). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, ""OpenGL"", and many others with its default installation.
Deletions:
""FreeBASIC"" is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, ""OpenGL"", and many others with its default installation.


Revision [19902]

Edited on 2016-02-10 15:45:15 by DkLwikki [Update link format]
Additions:
See the [[CompilerCredits|FreeBASIC Credits]] page.
The [[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all|Computer Languages Benchmark Game]], an independent test team, give ""FreeBASIC"" for Linux a speed 1.8 times slower than ""GNU g++"". Tests are about calculation, memory and disk access speed in console programs, no graphics capabilities were tested. This is not a bad result considering ""FreeBASIC"" is not yet an optimizing compiler.
See [[LangQB|Differences between FreeBASIC and QuickBASIC]].
""FreeBASIC"" (since version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects|A Beginners Guide to Types as Objects]].
You can find out what's planned for the future releases by directly looking at [[http://sourceforge.net/p/fbc/code/ci/master/tree/todo.txt|fbc's todo.txt]].
""FreeBASIC"" has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won't help you with Unicode. On other platforms you can use [[KeyPgWstring|Wstrings]] to support any charset you need. The File OPEN keyword has an additional [[KeyPgEncoding|Encoding]] parameter allowing for different encodings. As ""FreeBASIC"" is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..).
For the output to screen the support is different from console to graphics. In console mode wstring printing in non latin charsets is supported if the console font supports them. Graphics mode uses an internal CP437 charset (the old DOS charset) font so non-latin output requires a custom made raster font and the use of the [[KeyPgDrawString|DRAW STRING]] keyword. Third party tools exist to grab an external font and convert it to the DRAW STRING format.
Yes, FB has built in functions to access the serial/COM port and hardware/CPU ports with no need of external libraries. See the {{anchor name="item999|OS specific FAQ's"}} for details for your OS, and [[KeyPgOpenCom|Open Com]], [[KeyPgInp|INP]] and [[KeyPgOut|OUT]] .
The ""FreeBASIC"" Wiki is the most up-to-date manual for using ""FreeBASIC"", available [[http://www.freebasic.net/wiki/|here]].
Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum|official one]], can be found at [[http://www.qbasicnews.com/|qbasicnews]], [[http://www.petesqbsite.com/phpBB3/|Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php|the FB Games directory]] or [[http://www.freebasic-portal.de|freebasic-portal.de (in German)]].
Active magazines which regularly have ""FreeBASIC"" related articles are [[http://www.petesqbsite.com/sections/express/express.shtml|QB Express]] and [[http://www.qbxl.net/|QBXL Magazine]]. These magazines are always looking for new articles, so if you think you've got a good idea for an article about ""FreeBASIC"", submit it!
Offline versions of this wiki (in CHM, HTML and other formats) are available from the [[http://sourceforge.net/projects/fbc/files/Documentation/|Documentation directory at fbc's downloads site on SourceForge]].
See [[CompilerDialects|Compiler Dialects]] for details.
This generally happens because you made an //[[ProPgStorageClasses|automatic]]// fixed-length array too large, and it is corrupting the program stack. You have a couple of options:
- defining the array with an empty subscript list (using ##[[KeyPgDim|Dim]]##), or
- defining the array with variable subscripts instead of numeric literals, [[KeyPgConst|constants]] or [[KeyPgEnum|enums]] (using ##[[KeyPgDim|Dim]]##), or
- defining the array with ##[[KeyPgRedim|Redim]]##
- reserve more memory for the program stack by using the ##-t## [[CompilerCmdLine|command-line option]] when compiling. The default is ##-t 1024## (kilobytes). Note: it's a bad idea to use very large values here.
- create a //static// array by defining the array with ##[[KeyPgStatic|Static]]## rather than ##[[KeyPgDim|Dim]]## (only locally visible, but globally preserved)
- define the array with ##[[KeyPgShared|Shared]]## access using ##[[KeyPgDim|Dim]]## (this makes the array fully global)
- use [[ProPgPointers|Pointers]] and [[CatPgMemory|Memory Functions]] like ##[[KeyPgAllocate|Allocate]]## and ##[[KeyPgDeallocate|Deallocate]]## to manage memory yourself - this is the preferred way for storing big buffers, but not for beginners.
//Static// and //variable-length// arrays don't use the program stack for their element data, so do not have the problem associated with //automatic// fixed-length arrays. See [[ProPgStorageClasses|Storage Classes]] for more information. Note that storing huge buffers as //static// or increasing the stack size far above the default is not a very good idea, since it increases the fixed amount of memory needed to load and start you program, even if most of it is not used later, and can result in performance degrade, or even refusing your program to load at all.
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib|#Inclib]]## or on the compiler command line with ##[[CompilerOptL|-l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there.
C libraries are set up in much the same way in ""FreeBASIC"" as they are in C. Every library included with ""FreeBASIC"" has a basic include file named "//library name//.bi" which uses the [[KeyPgInclib|#INCLIB]] metacommand to include the library, and the [[KeyPgDeclare|Declare statement]] to declare the functions within the library. ""FreeBASIC"" includes hundreds of BI files, see full list of library headers [[ExtLibTOC|here]].
- ""Win32"": Insight is an user friendly wrapper for GDB, see [[FaqPgWin32|Win32 related FAQ]].
Yes, this functionality exists since version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction|byref]] as //datatype//## for the return type.
- [[FaqPgWin32|Win32 related FAQ]]
- [[FaqDOS|DOS related FAQ]]
- [[FaqPgLinux|Linux related FAQ]]
- [[FaqPgrtlib|FB Runtime Library FAQ]]
- [[FaqPggfxlib2|Frequently Asked FreeBASIC Graphics Library Questions]]
Deletions:
See the [[CompilerCredits FreeBASIC Credits]] page.
The [[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all Computer Languages Benchmark Game]], an independent test team, give ""FreeBASIC"" for Linux a speed 1.8 times slower than ""GNU g++"". Tests are about calculation, memory and disk access speed in console programs, no graphics capabilities were tested. This is not a bad result considering ""FreeBASIC"" is not yet an optimizing compiler.
See [[LangQB Differences between FreeBASIC and QuickBASIC]].
""FreeBASIC"" (since version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]].
You can find out what's planned for the future releases by directly looking at [[http://sourceforge.net/p/fbc/code/ci/master/tree/todo.txt fbc's todo.txt]].
""FreeBASIC"" has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won't help you with Unicode. On other platforms you can use [[KeyPgWstring Wstrings]] to support any charset you need. The File OPEN keyword has an additional [[KeyPgEncoding Encoding]] parameter allowing for different encodings. As ""FreeBASIC"" is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..).
For the output to screen the support is different from console to graphics. In console mode wstring printing in non latin charsets is supported if the console font supports them. Graphics mode uses an internal CP437 charset (the old DOS charset) font so non-latin output requires a custom made raster font and the use of the [[KeyPgDrawString DRAW STRING]] keyword. Third party tools exist to grab an external font and convert it to the DRAW STRING format.
Yes, FB has built in functions to access the serial/COM port and hardware/CPU ports with no need of external libraries. See the {{anchor name="item999|OS specific FAQ's"}} for details for your OS, and [[KeyPgOpenCom Open Com]], [[KeyPgInp INP]] and [[KeyPgOut OUT]] .
The ""FreeBASIC"" Wiki is the most up-to-date manual for using ""FreeBASIC"", available [[http://www.freebasic.net/wiki/ here]].
Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/phpBB3/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Active magazines which regularly have ""FreeBASIC"" related articles are [[http://www.petesqbsite.com/sections/express/express.shtml QB Express]] and [[http://www.qbxl.net/ QBXL Magazine]]. These magazines are always looking for new articles, so if you think you've got a good idea for an article about ""FreeBASIC"", submit it!
Offline versions of this wiki (in CHM, HTML and other formats) are available from the [[http://sourceforge.net/projects/fbc/files/Documentation/ Documentation directory at fbc's downloads site on SourceForge]].
See [[CompilerDialects Compiler Dialects]] for details.
This generally happens because you made an //[[ProPgStorageClasses automatic]]// fixed-length array too large, and it is corrupting the program stack. You have a couple of options:
- defining the array with an empty subscript list (using ##[[KeyPgDim Dim]]##), or
- defining the array with variable subscripts instead of numeric literals, [[KeyPgConst constants]] or [[KeyPgEnum enums]] (using ##[[KeyPgDim Dim]]##), or
- defining the array with ##[[KeyPgRedim Redim]]##
- reserve more memory for the program stack by using the ##-t## [[CompilerCmdLine command-line option]] when compiling. The default is ##-t 1024## (kilobytes). Note: it's a bad idea to use very large values here.
- create a //static// array by defining the array with ##[[KeyPgStatic Static]]## rather than ##[[KeyPgDim Dim]]## (only locally visible, but globally preserved)
- define the array with ##[[KeyPgShared Shared]]## access using ##[[KeyPgDim Dim]]## (this makes the array fully global)
- use [[ProPgPointers Pointers]] and [[CatPgMemory Memory Functions]] like ##[[KeyPgAllocate Allocate]]## and ##[[KeyPgDeallocate Deallocate]]## to manage memory yourself - this is the preferred way for storing big buffers, but not for beginners.
//Static// and //variable-length// arrays don't use the program stack for their element data, so do not have the problem associated with //automatic// fixed-length arrays. See [[ProPgStorageClasses Storage Classes]] for more information. Note that storing huge buffers as //static// or increasing the stack size far above the default is not a very good idea, since it increases the fixed amount of memory needed to load and start you program, even if most of it is not used later, and can result in performance degrade, or even refusing your program to load at all.
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib #Inclib]]## or on the compiler command line with ##[[CompilerOptL -l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there.
C libraries are set up in much the same way in ""FreeBASIC"" as they are in C. Every library included with ""FreeBASIC"" has a basic include file named "//library name//.bi" which uses the [[KeyPgInclib #INCLIB]] metacommand to include the library, and the [[KeyPgDeclare Declare statement]] to declare the functions within the library. ""FreeBASIC"" includes hundreds of BI files, see full list of library headers [[ExtLibTOC here]].
- ""Win32"": Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]].
Yes, this functionality exists since version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.
- [[FaqPgWin32 Win32 related FAQ]]
- [[FaqDOS DOS related FAQ]]
- [[FaqPgLinux Linux related FAQ]]
- [[FaqPgrtlib FB Runtime Library FAQ]]
- [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]]


Revision [17382]

Edited on 2014-11-09 01:16:12 by DoS386 [phpbb]
Additions:
Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/phpBB3/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Yes, this functionality exists since version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.
Deletions:
Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Yes, This functionality exists since version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.


Revision [17381]

Edited on 2014-11-09 01:12:02 by DoS386 [1.0]
Additions:
""FreeBASIC"" (since version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]].
Yes, This functionality exists since version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.
Deletions:
""FreeBASIC"" (as of version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]].
In version 0.24.0b and earlier, this is not possible. However, functionality for this now exists from version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.


Revision [17293]

Edited on 2014-09-26 15:53:35 by CountingPine [Linker error FAQ entry]
Additions:
==- {{anchor name="item24|Why does my program crash when I define an array larger than xx?"}}==
==- {{anchor name="item25|Why does my program fail to compile with the message 'cannot find -llibname'"?}}==
{{anchor name="item25"}}==Why does my program fail to compile with the message 'cannot find -llibname'"?==
This is an error raised by the linker. The program is supposed to link to an external library, designated in the program code with ##[[KeyPgInclib #Inclib]]## or on the compiler command line with ##[[CompilerOptL -l]]##. However, the linker has been unable to find a matching file in any of the library paths. Check the homepage of the library you want to compile with to find out how to download it, or check [[ExtLibTOC]] to see if information about the library can be found there.
Deletions:
==- {{anchor name="item24|Why does my program crash when I define an array larger than xx ?"}}==


Revision [17245]

Edited on 2014-09-06 16:10:52 by DkLwikki [Update, remove references to SVN]
Additions:
""FreeBASIC"" (as of version 0.90) supports classes (user-defined types) with member functions (methods), static methods, static member variables, constructors, destructors, properties, operator overloading, single inheritance, virtual and abstract methods (polymorphism) and run-time type information. Future plans regarding OOP functionality include adding support for multiple inheritance and/or interfaces. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]].
You can find out what's planned for the future releases by directly looking at [[http://sourceforge.net/p/fbc/code/ci/master/tree/todo.txt fbc's todo.txt]].
This online Wiki is the official documentation for FB. Usually it is up-to-date with the latest improvements found in the development version of FB.
Offline versions of this wiki (in CHM, HTML and other formats) are available from the [[http://sourceforge.net/projects/fbc/files/Documentation/ Documentation directory at fbc's downloads site on SourceForge]].
Deletions:
Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future (0.23). At the moment (version 0.22) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]] and [[http://www.freebasic.net/forum/viewtopic.php?t=17571 Forum t=17571 "New fbc branch ('inheritance') on sourceforge (fbc SVN)"]].
You can find out what's planned for the future releases by directly looking at the TODO file for the compiler, currently in SVN [[http://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC/src/compiler/TODO.txt?view=markup here]].
The official documentation for FB is this Wiki, usually it is current with the latest improvements found in the SVN.
From time to time this Wiki is converted to several offline readable formats. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats here: [[http://sourceforge.net/projects/fbc/files/Documentation/ sf.net/.../Documentation]], ""CoderJeff""'s page (has FBHELP, doesn't have up-to-date manuals): [[http://www.execulink.com/~coder/freebasic/docs.html execulink.com/.../docs.html]].


Revision [17006]

Edited on 2014-03-03 07:28:32 by DkLwikki [Remove outdated gfxlib2 note regarding license]
Additions:
- The library is distributed under the LGPL with additional exception, meaning you may do whatever you want with your compiled programs, including selling them.
Deletions:
- The library is distributed under the LGPL with additional exception, meaning you may do whatever you want with your compiled programs, including selling them (note: possible problem with graphics library).


Revision [16987]

Edited on 2014-01-04 14:08:38 by FxMwikki [Updated: "Does FreeBASIC support returning reference from Functions, like in C++?"]
Additions:
In version 0.24.0b and earlier, this is not possible. However, functionality for this now exists from version 0.90.0. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.
Deletions:
In version 0.24.0b and earlier, this is not possible. However, functionality for this now exists in the source code for prerelease versions. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.


Revision [16575]

Edited on 2013-02-04 00:17:29 by CountingPine [Update item: functions can now return references]
Additions:
In version 0.24.0b and earlier, this is not possible. However, functionality for this now exists in the source code for prerelease versions. Procedures can now return references using ##[[KeyPgByrefFunction byref]] as //datatype//## for the return type.
Deletions:
As of version 0.20.0b, no. There are some keywords, such as ##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]], for instance, that behave as if they were ##[[KeyPgFunction Function]]## procedures that return a reference, as in ""C++"". That is, they evaluate to something that can be used in place of an object, much like [[ProPgPassingArguments reference parameters]].
For example, if ##//mystring//## is of type ##[[KeyPgString String]]## of non-zero length, then ##//mystring[0]//## evaluates to a reference to the first character (a ##[[KeyPgUbyte UByte]]##), which can be assigned to and modified, passed to procedures, etc.
##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]] are documented as ##[[KeyPgFunction Function]]## procedures or operators that return a value, since ""FreeBASIC"" does not yet support returning references. When returning references is supported, the documentation will be changed to reflect that.


Revision [15748]

Edited on 2012-01-21 23:40:17 by CountingPine [Change [[http://freebasic.net/wiki/...]] link to internal link]
Additions:
See [[CompilerDialects Compiler Dialects]] for details.
Deletions:
See [[http://www.freebasic.net/wiki/wikka.php?wakka=CompilerDialects Compiler Dialects]] for details.


Revision [15746]

Edited on 2012-01-21 23:35:48 by CountingPine [Change [[http://freebasic.net/wiki/...]] link to internal link]
Additions:
Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future (0.23). At the moment (version 0.22) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented. For more information see: [[TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]] and [[http://www.freebasic.net/forum/viewtopic.php?t=17571 Forum t=17571 "New fbc branch ('inheritance') on sourceforge (fbc SVN)"]].
Deletions:
Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future (0.23). At the moment (version 0.22) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented. For more information see: [[http://www.freebasic.net/wiki/wikka.php?wakka=TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]] and [[http://www.freebasic.net/forum/viewtopic.php?t=17571 Forum t=17571 "New fbc branch ('inheritance') on sourceforge (fbc SVN)"]].


Revision [15103]

Edited on 2011-07-07 09:28:50 by DoS386 [Oops ... OOP]
Additions:
Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future (0.23). At the moment (version 0.22) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented. For more information see: [[http://www.freebasic.net/wiki/wikka.php?wakka=TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]] and [[http://www.freebasic.net/forum/viewtopic.php?t=17571 Forum t=17571 "New fbc branch ('inheritance') on sourceforge (fbc SVN)"]].
Deletions:
Some OOP functionality is available to the FB users since version 0.17. Complete OOP functionality is expected for the future. At the moment (V0.18.5) there are methods inside UDT and operator overloading but inheritance and polymorphism are not yet implemented . For more information see: [[http://www.freebasic.net/wiki/wikka.php?wakka=TutBeginnersGuideToTypesAsObjects A Beginners Guide to Types as Objects]].


Revision [14820]

Edited on 2010-08-25 07:48:48 by DoS386 [one more]
Additions:
- reserve more memory for the program stack by using the ##-t## [[CompilerCmdLine command-line option]] when compiling. The default is ##-t 1024## (kilobytes). Note: it's a bad idea to use very large values here.
Deletions:
- reserve more memory for the program stack by using the ##-t## command-line option. The default is ##-t 1024## (kilobytes).


Revision [14819]

Edited on 2010-08-25 07:43:26 by DoS386 [typo + outdated link]
Additions:
From time to time this Wiki is converted to several offline readable formats. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats here: [[http://sourceforge.net/projects/fbc/files/Documentation/ sf.net/.../Documentation]], ""CoderJeff""'s page (has FBHELP, doesn't have up-to-date manuals): [[http://www.execulink.com/~coder/freebasic/docs.html execulink.com/.../docs.html]].
Deletions:
From time to time this Wiki is converted to several offline readable formats. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats here: [[http://sourceforge.net/projects/fbc/files/Documentation/ sf.net/.../Documentation]], CoderJeff's page (has FBHELP, doesn't have up-to-date manuals): [http://www.execulink.com/~coder/freebasic/docs.html execulink.com/.../docs.html]].


Revision [14818]

Edited on 2010-08-25 07:42:21 by DoS386 [outdated link]
Additions:
From time to time this Wiki is converted to several offline readable formats. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats here: [[http://sourceforge.net/projects/fbc/files/Documentation/ sf.net/.../Documentation]], CoderJeff's page (has FBHELP, doesn't have up-to-date manuals): [http://www.execulink.com/~coder/freebasic/docs.html execulink.com/.../docs.html]].
Deletions:
From time to tine this Wiki is converted to an offline readable format. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats [[http://www.execulink.com/~coder/freebasic/docs.html here]]


Revision [14817]

Edited on 2010-08-23 12:21:11 by CountingPine [Oops]
Additions:
- It supports modern APIs such as SDL, ""DirectX"", ""Win32"", and ""OpenGL"".
Deletions:
- It supports modern APIs such as SDL, ""DirectX", ""Win32"", and ""OpenGL"".


Revision [14816]

Edited on 2010-08-23 12:16:42 by CountingPine [""CamelCase""]
Additions:
""FreeBASIC"" is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, ""OpenGL"", and many others with its default installation.
The first versions of ""FreeBASIC"" were developed exclusively by V1ctor. Later versions gained contributions from many people, including Lillo, who developed the Linux port and the graphics library, and ""DrV"", who developed the DOS port.
- It supports modern APIs such as SDL, ""DirectX", ""Win32"", and ""OpenGL"".
""FreeBASIC"" is fully compatible with Windows, MS-DOS, ""FreeDOS"" and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing ""OpenGL"" will work in Windows and Linux, for example, but won't in DOS, because ""OpenGL"" is not available for DOS.
- ""Win32"": Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]].
Deletions:
""FreeBASIC"" is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, OpenGL, and many others with its default installation.
The first versions of ""FreeBASIC"" were developed exclusively by V1ctor. Later versions gained contributions from many people, including Lillo, who developed the Linux port and the graphics library, and DrV, who developed the DOS port.
- It supports modern APIs such as SDL, DirectX, Win32, and OpenGL.
""FreeBASIC"" is fully compatible with Windows, MS-DOS, FreeDOS and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing OpenGL will work in Windows and Linux, for example, but won't in DOS, because OpenGL is not available for DOS.
- Win32: Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]].


Revision [14813]

Edited on 2010-08-23 07:21:47 by GaLeon [Changed off-line to offline]
Additions:
From time to tine this Wiki is converted to an offline readable format. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats [[http://www.execulink.com/~coder/freebasic/docs.html here]]
Deletions:
From time to tine this Wiki is converted to an off-line readable format. [[http://sourceforge.net/project/showfiles.php?group_id=122342&package_id=159165 CHM]] for Windows users, other formats [[http://www.execulink.com/~coder/freebasic/docs.html here]]


Revision [14810]

Edited on 2010-08-22 09:46:55 by GaLeon [Changed Free-DOS to FreeDOS]
Additions:
""FreeBASIC"" is fully compatible with Windows, MS-DOS, FreeDOS and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing OpenGL will work in Windows and Linux, for example, but won't in DOS, because OpenGL is not available for DOS.
Deletions:
""FreeBASIC"" is fully compatible with Windows, MS-DOS, Free-DOS and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing OpenGL will work in Windows and Linux, for example, but won't in DOS, because OpenGL is not available for DOS.


Revision [14804]

Edited on 2010-08-22 08:06:34 by GaLeon [Changed apps to applications]
Additions:
==- {{anchor name="item12|Can I use a non-latin charset in my FreeBASIC applications?"}}==
There are some API wrappers and experimental RAD applications that create non-portable GUI code for Windows.
{{anchor name="item12"}}==Can I use a non-latin charset in my ""FreeBASIC"" applications?==
Deletions:
==- {{anchor name="item12|Can I use a non-latin charset in my FreeBASIC apps?"}}==
There are some API wrappers and experimental RAD apps that create non-portable GUI code for Windows.
{{anchor name="item12"}}==Can I use a non-latin charset in my ""FreeBASIC"" apps?==


Revision [14786]

Edited on 2010-08-21 00:58:50 by GaLeon [Changed run-time to runtime]
Additions:
- [[FaqPgrtlib FB Runtime Library FAQ]]
Deletions:
- [[FaqPgrtlib FB Run-Time Library FAQ]]


Revision [14774]

Edited on 2010-08-20 08:29:36 by GaLeon [Changed QuickBasic to QuickBASIC.]
Additions:
==- {{anchor name="item6|How compatible is FreeBASIC with QuickBASIC?"}}==
Most tests run by the community have shown ""FreeBASIC"" is significantly faster than ""QuickBASIC"", faster than most other GPL or commercial BASICs, and often approaching GCC in terms of speed.
One area where there is a notable speed deficiency is in 32-bit console modes. While ""FreeBASIC"" is consistently on-par with other 32-bit console mode applications, 32-bit console mode operations are significantly slower than 16-bit console operations, as seen in ""QuickBASIC"". In DOS version, some I/O operations can slow down after porting from a 16-bit BASIC to FB - optimizing the code brings the speed back.
{{anchor name="item6"}}==How compatible is ""FreeBASIC"" with ""QuickBASIC""?==
See [[LangQB Differences between FreeBASIC and QuickBASIC]].
Deletions:
==- {{anchor name="item6|How compatible is FreeBASIC with QuickBasic?"}}==
Most tests run by the community have shown ""FreeBASIC"" is significantly faster than ""QuickBasic"", faster than most other GPL or commercial BASICs, and often approaching GCC in terms of speed.
One area where there is a notable speed deficiency is in 32-bit console modes. While ""FreeBASIC"" is consistently on-par with other 32-bit console mode applications, 32-bit console mode operations are significantly slower than 16-bit console operations, as seen in ""QuickBasic"". In DOS version, some I/O operations can slow down after porting from a 16-bit BASIC to FB - optimizing the code brings the speed back.
{{anchor name="item6"}}==How compatible is ""FreeBASIC"" with ""QuickBasic""?==
See [[LangQB Differences between FreeBASIC and QuickBasic]].


Revision [14226]

Edited on 2009-08-20 02:52:07 by CountingPine [updated]

No Differences

Revision [14152]

Edited on 2009-06-01 10:59:26 by LaananFisher [`C++' needed double-quotes]
Additions:
{{anchor name="item37"}}==Does ""FreeBASIC"" support returning references from Functions, like in ""C++""?==
As of version 0.20.0b, no. There are some keywords, such as ##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]], for instance, that behave as if they were ##[[KeyPgFunction Function]]## procedures that return a reference, as in ""C++"". That is, they evaluate to something that can be used in place of an object, much like [[ProPgPassingArguments reference parameters]].
Deletions:
{{anchor name="item37"}}==Does ""FreeBASIC"" support returning references from Functions, like in C++?==
As of version 0.20.0b, no. There are some keywords, such as ##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]], for instance, that behave as if they were ##[[KeyPgFunction Function]]## procedures that return a reference, as in C++. That is, they evaluate to something that can be used in place of an object, much like [[ProPgPassingArguments reference parameters]].


Revision [14151]

Edited on 2009-05-30 09:24:33 by DoS386 [one was too much]
Additions:
""FreeBASIC"" compiler is self-hosting - written in ""FreeBASIC"", the libraries however are written in C.
- Win32: Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]].
- DOS: Be warned that DOS also has product named "Insight", but it's a real mode debugger not usable with ""FreeBASIC"", use GDB or some DPMI32 debugger at least.
- Linux: use GDB.
- [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]]
Deletions:
""FreeBASIC"" compiler is self-hosting - written in ""FreeBASIC"", most libraries however are written in C.
- Win32: Insight is an user friendly wrapper for GDB, see [[FaqPgWin32 Win32 related FAQ]].
- DOS: Be warned that DOS also has product named "Insight", but it's a real mode debugger not usable with ""FreeBASIC"", use GDB or a DPMI32 debugger at least.
- Linux: use GDB.
- [[FaqPggfxlib2 Frequently Asked ""FreeBASIC"" Graphics Library Questions]]


Revision [14150]

Edited on 2009-05-29 06:55:53 by CountingPine [Fix some CamelCase links]
Additions:
**""FreeBASIC"" questions:**
**Getting Started with ""FreeBASIC"" questions**
**Advanced ""FreeBASIC""**
@@**""FreeBASIC"" questions**@@
{{anchor name="item1"}}==What is ""FreeBASIC""?==
""FreeBASIC"" is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft ""QuickBASIC"", but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, OpenGL, and many others with its default installation.
Aside from having a syntax mostly compatible with ""QuickBASIC"", ""FreeBASIC"" introduces several new features to the aged language, including pointers to variables and functions, and unsigned data types.
""FreeBASIC"" compiler is self-hosting - written in ""FreeBASIC"", most libraries however are written in C.
{{anchor name="item2"}}==Who is responsible for ""FreeBASIC""?==
The first versions of ""FreeBASIC"" were developed exclusively by V1ctor. Later versions gained contributions from many people, including Lillo, who developed the Linux port and the graphics library, and DrV, who developed the DOS port.
{{anchor name="item3"}}==Why should I use ""FreeBASIC"" rather than ""QBasic""?==
""FreeBASIC"" has innumerable advantages over ""QBasic"", ""QuickBASIC"", PDS, and Visual Basic for DOS.
- It supports 32-bit processors, where ""QBasic"" is designed for 16-bit CPU's.
- It is distributed under the GPL, meaning it's free and legal to use, unlike most copies of ""QuickBASIC"" / other BASICs.
- ""FreeBASIC"" is many times faster than ""QuickBASIC"" / other BASICs.
- ""FreeBASIC"" supports many features, such as pointers and inline Assembly, which are not available in ""QuickBASIC"" / other BASICs.
- ""QuickBASIC"" only supports DOS. Windows support for DOS emulation (and thus ""QuickBASIC"") is becoming thinner with every new version. Vista does not support graphics or fullscreen text for DOS applications.
{{anchor name="item4"}}==Why should I use ""FreeBASIC"" rather than some other newer BASIC ?==
""FreeBASIC"" has many traits which make it more desirable than most other BASIC language implementations:
- ""FreeBASIC"" adheres closely to the standard BASIC syntax, making it easier to use.
- ""FreeBASIC"" is compiled to actual programs (executables), not bytecode.
- ""FreeBASIC"" has a large, dedicated community which has actively participated in the development of ""FreeBASIC"".
- ""FreeBASIC"" utilizes standard methods of accessing common C libraries. SDL, for example, is standard C SDL, not a new set of intrinsic commands.
- ""FreeBASIC"" has ports to Windows, Linux, and 32-bit DOS. It retains consistent syntax between the three ports.
{{anchor name="item5"}}==How fast is ""FreeBASIC""?==
Most tests run by the community have shown ""FreeBASIC"" is significantly faster than ""QuickBasic"", faster than most other GPL or commercial BASICs, and often approaching GCC in terms of speed.
The [[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all Computer Languages Benchmark Game]], an independent test team, give ""FreeBASIC"" for Linux a speed 1.8 times slower than ""GNU g++"". Tests are about calculation, memory and disk access speed in console programs, no graphics capabilities were tested. This is not a bad result considering ""FreeBASIC"" is not yet an optimizing compiler.
One area where there is a notable speed deficiency is in 32-bit console modes. While ""FreeBASIC"" is consistently on-par with other 32-bit console mode applications, 32-bit console mode operations are significantly slower than 16-bit console operations, as seen in ""QuickBasic"". In DOS version, some I/O operations can slow down after porting from a 16-bit BASIC to FB - optimizing the code brings the speed back.
{{anchor name="item6"}}==How compatible is ""FreeBASIC"" with ""QuickBasic""?==
The ""FreeBASIC"" built in graphics library emulates the most used QB graphics modes (modes 7,12,13) and implements all the drawing primitives featured in QB.
Other issues in porting old QB programs, like variable name clashes with new FB keywords, variables with the name of a QB keyword plus a type suffix, default integer size being 32 bits in FB, are addressed by running ""FreeBASIC"" with the commandline switch ##-lang qb## .
{{anchor name="item7"}}==How compatible is ""FreeBASIC"" with Windows? DOS? Linux? ==
""FreeBASIC"" is fully compatible with Windows, MS-DOS, Free-DOS and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing OpenGL will work in Windows and Linux, for example, but won't in DOS, because OpenGL is not available for DOS.
{{anchor name="item8"}}==Does ""FreeBASIC"" support Object Oriented Programming?==
{{anchor name="item12"}}==Can I use a non-latin charset in my ""FreeBASIC"" apps?==
""FreeBASIC"" has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won't help you with Unicode. On other platforms you can use [[KeyPgWstring Wstrings]] to support any charset you need. The File OPEN keyword has an additional [[KeyPgEncoding Encoding]] parameter allowing for different encodings. As ""FreeBASIC"" is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..).
@@**Getting Started with ""FreeBASIC"" questions**@@
{{anchor name="item20"}}==Where can I find more information about ""FreeBASIC""?==
The ""FreeBASIC"" Wiki is the most up-to-date manual for using ""FreeBASIC"", available [[http://www.freebasic.net/wiki/ here]].
Active ""FreeBASIC"" related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Active magazines which regularly have ""FreeBASIC"" related articles are [[http://www.petesqbsite.com/sections/express/express.shtml QB Express]] and [[http://www.qbxl.net/ QBXL Magazine]]. These magazines are always looking for new articles, so if you think you've got a good idea for an article about ""FreeBASIC"", submit it!
{{anchor name="item21"}}==Why doesn't the QB GUI open when I start ""FreeBASIC""?==
QB had an Integrated Development Environment (IDE). ""FreeBASIC"" does not.
""FreeBASIC"" is only a compiler, not a complete ""QuickBASIC"" clone. It is a console mode application. It will accept a BAS file on the command line, and spit out an EXE file.
-##lang fblite## offers ""FreeBASIC"" language compatibility, with a more QBASIC-compatible coding style.
@@**Advanced ""FreeBASIC""**@@
C libraries are set up in much the same way in ""FreeBASIC"" as they are in C. Every library included with ""FreeBASIC"" has a basic include file named "//library name//.bi" which uses the [[KeyPgInclib #INCLIB]] metacommand to include the library, and the [[KeyPgDeclare Declare statement]] to declare the functions within the library. ""FreeBASIC"" includes hundreds of BI files, see full list of library headers [[ExtLibTOC here]].
""FreeBASIC"" can use preferably a debugger compatible with GNU GDB.
- DOS: Be warned that DOS also has product named "Insight", but it's a real mode debugger not usable with ""FreeBASIC"", use GDB or a DPMI32 debugger at least.
Yes, since ""FreeBASIC"" is a fully 32-bit compiler it may operate on source files up to theoretically 4GB or 4294967296 bytes, however your RAM capacity should be significantly above the size of your source, otherwise the compilation won't finish or will be very slow at least.
{{anchor name="item35"}}==Can I write an OS in ""FreeBASIC"" ?==
""FreeBASIC"" relies on GCC, and available informations about developing an OS in C apply to ""FreeBASIC"" as well. FB will help you neither more nor less than GCC.
{{anchor name="item36"}}==I'm developing an OS, can ""FreeBASIC"" be ported to my OS ?==
{{anchor name="item37"}}==Does ""FreeBASIC"" support returning references from Functions, like in C++?==
##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]] are documented as ##[[KeyPgFunction Function]]## procedures or operators that return a value, since ""FreeBASIC"" does not yet support returning references. When returning references is supported, the documentation will be changed to reflect that.
- [[FaqPggfxlib2 Frequently Asked ""FreeBASIC"" Graphics Library Questions]]
Deletions:
**FreeBASIC questions:**
**Getting Started with FreeBASIC questions**
**Advanced FreeBASIC**
@@**FreeBASIC questions**@@
{{anchor name="item1"}}==What is FreeBASIC?==
FreeBASIC is a free, 32-bit BASIC compiler for Windows (32-bit), 32 bit protected-mode DOS (COFF executables, like DJGPP), and Linux (x86). It began as an attempt to create a code-compatible, free alternative to Microsoft QuickBasic, but has quickly grown into a powerful development tool, already including support for libraries such as Allegro, SDL, OpenGL, and many others with its default installation.
Aside from having a syntax mostly compatible with QuickBasic, FreeBASIC introduces several new features to the aged language, including pointers to variables and functions, and unsigned data types.
FreeBASIC compiler is self-hosting - written in FreeBASIC, most libraries however are written in C.
{{anchor name="item2"}}==Who is responsible for FreeBASIC?==
The first versions of FreeBASIC were developed exclusively by V1ctor. Later versions gained contributions from many people, including Lillo, who developed the Linux port and the graphics library, and DrV, who developed the DOS port.
{{anchor name="item3"}}==Why should I use FreeBASIC rather than QBasic?==
FreeBASIC has innumerable advantages over QBasic, QuickBasic, PDS, and Visual Basic for DOS.
- It supports 32-bit processors, where QBasic is designed for 16-bit CPU's.
- It is distributed under the GPL, meaning it's free and legal to use, unlike most copies of QuickBasic / other BASICs.
- FreeBASIC is many times faster than QuickBasic / other BASICs.
- FreeBASIC supports many features, such as pointers and inline Assembly, which are not available in QuickBasic / other BASICs.
- QuickBASIC only supports DOS. Windows support for DOS emulation (and thus QuickBasic) is becoming thinner with every new version. Vista does not support graphics or fullscreen text for DOS applications.
{{anchor name="item4"}}==Why should I use FreeBASIC rather than some other newer BASIC ?==
FreeBASIC has many traits which make it more desirable than most other BASIC language implementations:
- FreeBASIC adheres closely to the standard BASIC syntax, making it easier to use.
- FreeBASIC is compiled to actual programs (executables), not bytecode.
- FreeBASIC has a large, dedicated community which has actively participated in the development of FreeBASIC.
- FreeBASIC utilizes standard methods of accessing common C libraries. SDL, for example, is standard C SDL, not a new set of intrinsic commands.
- FreeBASIC has ports to Windows, Linux, and 32-bit DOS. It retains consistent syntax between the three ports.
{{anchor name="item5"}}==How fast is FreeBASIC?==
Most tests run by the community have shown FreeBASIC is significantly faster than QuickBasic, faster than most other GPL or commercial BASICs, and often approaching GCC in terms of speed.
The [[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all Computer Languages Benchmark Game]], an independent test team, give FreeBASIC for Linux a speed 1.8 times slower than ""GNU g++"". Tests are about calculation, memory and disk access speed in console programs, no graphics capabilities were tested. This is not a bad result considering FreeBASIC is not yet an optimizing compiler.
One area where there is a notable speed deficiency is in 32-bit console modes. While FreeBASIC is consistently on-par with other 32-bit console mode applications, 32-bit console mode operations are significantly slower than 16-bit console operations, as seen in QuickBasic. In DOS version, some I/O operations can slow down after porting from a 16-bit BASIC to FB - optimizing the code brings the speed back.
{{anchor name="item6"}}==How compatible is FreeBASIC with QuickBasic?==
The FreeBASIC built in graphics library emulates the most used QB graphics modes (modes 7,12,13) and implements all the drawing primitives featured in QB.
Other issues in porting old QB programs, like variable name clashes with new FB keywords, variables with the name of a QB keyword plus a type suffix, default integer size being 32 bits in FB, are addressed by running FreeBASIC with the commandline switch ##-lang qb## .
{{anchor name="item7"}}==How compatible is FreeBASIC with Windows? DOS? Linux? ==
FreeBASIC is fully compatible with Windows, MS-DOS, Free-DOS and Linux. When planning to create a program for all three platforms, however, keep API availability in mind -- code utilizing OpenGL will work in Windows and Linux, for example, but won't in DOS, because OpenGL is not available for DOS.
{{anchor name="item8"}}==Does FreeBASIC support Object Oriented Programming?==
{{anchor name="item12"}}==Can I use a non-latin charset in my FreeBASIC apps?==
FreeBASIC has the Unicode support provided by the C runtime library for the given platform. This means FB DOS won't help you with Unicode. On other platforms you can use [[KeyPgWstring Wstrings]] to support any charset you need. The File OPEN keyword has an additional [[KeyPgEncoding Encoding]] parameter allowing for different encodings. As FreeBASIC is coded itself in FB, this means you can code your source in an Unicode editor so the comments and string literals can be in any character set (keywords, labels and names for variables and procedures must be kept inside the ASCII set..).
@@**Getting Started with FreeBASIC questions**@@
{{anchor name="item20"}}==Where can I find more information about FreeBASIC?==
The FreeBASIC Wiki is the most up-to-date manual for using FreeBASIC, available [[http://www.freebasic.net/wiki/ here]].
Active FreeBASIC related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Active magazines which regularly have FreeBASIC related articles are [[http://www.petesqbsite.com/sections/express/express.shtml QB Express]] and [[http://www.qbxl.net/ QBXL Magazine]]. These magazines are always looking for new articles, so if you think you've got a good idea for an article about FreeBASIC, submit it!
{{anchor name="item21"}}==Why doesn't the QB GUI open when I start FreeBASIC?==
QB had an Integrated Development Environment (IDE). FreeBASIC does not.
FreeBASIC is only a compiler, not a complete QuickBasic clone. It is a console mode application. It will accept a BAS file on the command line, and spit out an EXE file.
-##lang fblite## offers FreeBASIC language compatibility, with a more QBASIC-compatible coding style.
@@**Advanced FreeBASIC**@@
C libraries are set up in much the same way in FreeBASIC as they are in C. Every library included with FreeBASIC has a basic include file named "//library name//.bi" which uses the [[KeyPgInclib #INCLIB]] metacommand to include the library, and the [[KeyPgDeclare Declare statement]] to declare the functions within the library. FreeBASIC includes hundreds of BI files, see full list of library headers [[ExtLibTOC here]].
FreeBASIC can use preferably a debugger compatible with GNU GDB.
- DOS: Be warned that DOS also has product named "Insight", but it's a real mode debugger not usable with FreeBASIC, use GDB or a DPMI32 debugger at least.
Yes, since FreeBASIC is a fully 32-bit compiler it may operate on source files up to theoretically 4GB or 4294967296 bytes, however your RAM capacity should be significantly above the size of your source, otherwise the compilation won't finish or will be very slow at least.
{{anchor name="item35"}}==Can I write an OS in FreeBASIC ?==
FreeBASIC relies on GCC, and available informations about developing an OS in C apply to FreeBASIC as well. FB will help you neither more nor less than GCC.
{{anchor name="item36"}}==I'm developing an OS, can FreeBASIC be ported to my OS ?==
{{anchor name="item37"}}==Does FreeBASIC support returning references from Functions, like in C++?==
##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]] are documented as ##[[KeyPgFunction Function]]## procedures or operators that return a value, since FreeBASIC does not yet support returning references. When returning references is supported, the documentation will be changed to reflect that.
- [[FaqPggfxlib2 Frequently Asked FreeBASIC Graphics Library Questions]]


Revision [14145]

Edited on 2009-05-28 19:42:43 by LaananFisher [added reference returns FAQ]
Additions:
==- {{anchor name="item37|Does FreeBASIC support returning reference from Functions, like in C++?"}}==
{{anchor name="item37"}}==Does FreeBASIC support returning references from Functions, like in C++?==
As of version 0.20.0b, no. There are some keywords, such as ##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]], for instance, that behave as if they were ##[[KeyPgFunction Function]]## procedures that return a reference, as in C++. That is, they evaluate to something that can be used in place of an object, much like [[ProPgPassingArguments reference parameters]].
For example, if ##//mystring//## is of type ##[[KeyPgString String]]## of non-zero length, then ##//mystring[0]//## evaluates to a reference to the first character (a ##[[KeyPgUbyte UByte]]##), which can be assigned to and modified, passed to procedures, etc.
##[[KeyPgPeek Peek]]## and the [[CatPgOpIndexing indexing operators]] are documented as ##[[KeyPgFunction Function]]## procedures or operators that return a value, since FreeBASIC does not yet support returning references. When returning references is supported, the documentation will be changed to reflect that.


Revision [13879]

Edited on 2008-11-19 06:39:38 by SeBastian [freebasic.de doesn't exist any more. link fixed.]
Additions:
Active FreeBASIC related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic-portal.de freebasic-portal.de (in German)]].
Deletions:
Active FreeBASIC related forums, besides the [[http://www.freebasic.net/forum official one]], can be found at [[http://www.qbasicnews.com/ qbasicnews]], [[http://www.petesqbsite.com/forum/ Pete's QB Site]] , [[http://games.freebasic.net/forum/index.php the FB Games directory]] or [[http://www.freebasic.de/FBforum.htm freebasic.de (in German)]].


Revision [13353]

The oldest known version of this page was created on 2008-05-11 08:47:27 by DoS386 [freebasic.de doesn't exist any more. link fixed.]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode