
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
node-basic-lang
Advanced tools
BASIC interpreter
You need to have at least versionv14.0.0
of node.js installed.
Install the node-basic-lang
library globally:
npm install -g node-basic-lang
Create a BASIC program using the supported commands below. Make sure that the file ends in .bas
.
Run the BASIC program that you created
basic <program name>.bas
Example:
basic game.bas
You can use the REPL just by running the following command in the terminal:
basic
Make sure that you enter a unique line number for each command, just like you would a normal file. See supported commands below for a list of commands you can use.
ABS
- Prints out the absolute value of a number.
CLS
- Clears the console.
INT
- Prints out an integer by rounding any decimal number down.
PRINT
- Prints lines to the console.
REM
- Comments for the user. The interpreter ignores these lines.
END
- Exits the program.
10 CLS
20 REM "BASIC HELLO WORLD PROGRAM"
30 PRINT "HELLO WORLD"
40 PRINT "HELLO WORLD 2X"
50 PRINT "HELLO WORLD 3X"
60 ABS "-3.14"
70 INT "1.6180"
80 END
FAQs
BASIC interpreter
We found that node-basic-lang demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.