BASIC interpreter
- Install library:
npm install node-basic.js
- Create a file to import the library such as app.js:
var nodeBasic = require('node-basic.js');
-
Create a BASIC program using the guidelines below.
-
Run the BASIC program that you created
node <filename you created in step 2> <program name>
PRINT
- Prints lines to the console.
REM
- Comments for the user. The interpreter ignores these lines.
File should end in .bas
.
10 REM "BASIC HELLO WORLD PROGRAM"
20 PRINT "HELLO WORLD"
30 PRINT "HELLO WORLD 2X"
40 PRINT "HELLO WORLD 3X"