CLIBASIC is a version of BASIC designed to run in the command line or terminal
Examples: https://github.com/PQCraft/clibasic-examples
Documentation: https://github.com/PQCraft/clibasic-docs
Extensions: https://github.com/PQCraft/clibasic-extensions
Windows Readline: https://github.com/PQCraft/clibasic-winrllib
Arch (pacman
): base-devel
, readline
Debian (apt
): build-essential
, libreadline-dev
Alpine (apk
): build-base
, readline-dev
NT - 10 (download): MinGW
, Make for Windows
7 - 10 (choco
): mingw
, make
Mojave - Big Sur (brew
): gcc
, make
, readline
Arch (pacman
): git
Debian (apt
): git
Alpine (apk
): git
NT - 10 (download): git
7 - 10 (choco
): git
Mojave - Big Sur (brew
): git
To build, use make build
.
To run, use make run
or ./clibasic
.
To build then run, use make
(same as make all
).
Make sure you have downloaded the readline lib folder from here.
- Download the ZIP
- Go into the .zip file you downloaded
- Copy the
lib
folder inclibasic-winrllib-master
- Paste the folder into the directory with your CLIBASIC source code
Make sure the bin folders of MinGW and Make are in the %PATH%.
Type gcc --version
into CMD and if you received a "Can't recognize" message, MinGW is not in your %PATH%.
Type make --version
into CMD and if you received a "Can't recognize" message, Make is not in your %PATH%.
How to add MinGW and/or Make to the %PATH%:
- Navigate to where MinGW or Make is installed
- For MinGW, open the
mingw64
folder - Open the
bin
folder - Copy the location
- Add the location you copied to the %PATH% environment variable
- For Windows 7 and older
- Open the Start Menu
- Right-click on Computer and click Properties
- Click Advanced system settings
- Click the Advanced tab
- Click Environment Variables
- Under System variables, find Path and click Edit
- Add the copied location
- For Windows 8 and newer
- Open the Start Menu
- Search for and run 'Edit the system environment variables'
- Click Environment Variables
- Under System variables, find Path and click Edit
- Add the copied location
- For Windows 7 and older
To build, use make build
.
To run, use make run
or .\clibasic.exe
.
To build then run, use make
(same as make all
).
To build CLIBASIC with support for VT escape codes, add vt
before the rest of the rules.
- On Arch Linux, you can install CLIBASIC by installing either the
clibasic
orclibasic-bin
AUR package. - On Windows, pressing CTRL+C will not display a new prompt line due to the Windows version of readline catching and ignoring the CTRL+C.
- Most terminals cannot handle input while processing a cursor position request and INKEY$() will not reflect keys that were pressed during that time. The effect is more noticeable on terminals that are slow to respond such as Alacritty, Gnome Terminal, and Termux. A terminal that is fast to respond such as Konsole is recommended.
- If the file
.clibasic_history
is present in the user's home directory CLIBASIC will automatically save history there. Run_AUTOCMDHIST
,_SAVECMDHIST
(without any arguments), or create the file.clibasic_history
in your home/user folder to enable this feature. Remove the file to disable this feature. - CLIBASIC will look for
~/.clibasicrc
,~/autorun.bas
, then~/.autorun.bas
in this order in the user's home directory and run the first file found. - The development scripts are
build.sh
which is for testing if CLIBASIC compiles correctly for Linux and Windows,package.sh
which creates the zip files for making a CLIBASIC release,commit.sh
which automates the build and push process, andrelease-text.sh
which generates the text for making a CLIBASIC release. - Include the
clibasic.h
file when making a clibasic extension. - There will most likely not be any more updates as CLIBASIC is a major architectural disaster.