BaCon is a free BASIC to C converter for Unix-based systems. The following design goals were followed:
Must run on each Unix/Linux/BSD platform, including MacOSX
Converted sourcecode must be compilable with GCC
Must resemble genuine BASIC with implicit variable delarations
Spoken language constructs are preferred
To use Bacon your system must have Korn Shell or Bourne Again Shell (BASH)
available. If both Korn Shell nor Bash are available on your platform, download and install the free Public Domain Korn Shell
which can execute BaCon also. Furthermore BaCon works with the traditional Korn Shell KSH88,
but also with a newer Kornshell implementation like the MirBSD Korn Shell.
BaCon intends to be a programming aid in creating tools which can be compiled on different platforms (including 64bit environments). It tries to revive the days of
the good old BASIC.
Why does BaCon need BASH or Kornshell, a.k.a. why was BaCon implemented in shell script?
Shell script was chosen to ensure maximum Unix compatibility; on each Unix version and Linux distribution a Kornshell or
BASH can be found.
Now only one program has to be downloaded to perform Basic-to-C conversion, so no hazzle to download different kinds of
binaries for all the different Unix versions with their particular binary formats and dependencies.
If you think this is impossible or strange or lame, refer to the common Kornshell website where Kornshell is described as a
command and programming language. Note that a standalone BaCon binary always can be created by compiling the BaCon version of BaCon.
Do we really need to write BaCon keywords in capitals?
Yes, we do. This is a consequence of the fundamental decision to pass expressions as-they-are to the C compiler, which otherwise may
cause name conflicts with existing C keywords and C functions from external libraries.
The generated C code is hard to read!
That maybe so, as it never has been the intention to generate perfect readable C source code. However, the generated code is
portable and compilable on most Unix flavors (see below).
How to compile GTK programs in OpenBSD?
Compile as follows: ./bacon -l pthread gtkprogram.bac
How about a Win32 Version?
That will never be. This project started just because there was no decent BASIC to C converter for Unix. However, BaCon reportedly
works in a Cygwin environment (not supported). For Windows, a native Basic to C converter can be found here.
So what is the difference between BaCon and the recently released Linux BCX?
Linux BCX needs a C++ compiler. Furthermore check out this list.
Where can I find more free BASIC interpreters and compilers?
Check out the website of The Free Country, they have a lot of programming tools for
all kinds of languages!
Is there any relation with this BACON Basic converter or the BACON programming language?
No.
How to provide feedback on this project?
There is a Message Board where all issues and problems can be logged.