X11-Basic is a dialect of the BASIC programming langage with graphics capability that integrates fratures like shell scripting, cgi-Programming and full graphical visualisation into the easy to learn basic language on modern computers.
can be used to convert X11-Basic *.b bytecode binary files (produced with
into C sourcecode, which can be compiled with the gnu C compiler gcc or any
other ANSI C compiler, e.g. tcc, the tiny c compiler.
The sources depend on the x11basic.a or libx11basic.so libraries and on the
header file xb2csol.h, which therefore should be installed and linked. The
compiled programs will be faster than the interpreted ones and even a bit
faster than the bytecode processed ones (see
and xbvm(1) )
For a desciption of the X11-Basic language and usage of the interpreter see xbasic(1).
Xb2c processes one input file. The suffix of the input file is usually .b (a bytecode file produced by xbbc(1) ). The default output file name is 11.c but you can specify alternate names with the -o option.
For detailed help and description of the implemented basic commands take a look at the README file and the X11-Basic manual.
xbbc testme.bas -o testme.b produces a bytecode file testme.b xb2c testme.b -o testme.c produces a file testme.c gcc testme.c -o testme -lx11basic -ldl -lm -lcurses -lncurses -lasound -lreadline -lX11 produces an excecutable file testme. However the same result can be optained by xbc -virtualm testme.bas -o testme which does all the above steps.
You can find many sample programs in /usr/share/doc/packages/X11Basic/examples.
There is no way to recreate the .bas source code from the c file.. But still the c file is platform independant.
If you find a bug in the X11-Basic to C translator, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the X11-Basic package that you have.
Once you have determined that a bug actually exists, mail a bug report to email@example.com. If you have a fix, you are welcome to mail that as well! Suggestions may be mailed to the x11-basic bug tracking system.
Comments and bug reports concerning this manual page should be directed to firstname.lastname@example.org.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.