This is really cool!
What BASIC is this intended for?
I was able to get it to compile with QB64(PE) and also FreeBasic.
Tiny Craft Basic is an attempt at creating a simple line mode BASIC interpreter. It uses RPN for expression evaluation and was pretty much the first project I started out with in my efforts to develop a programming language. It is very minimal only having the most essential commands, but has plenty of functions.
The parser and evaluator are the heart. They are also used in the Windows version of Craft Basic and FTC BASIC. I use them in my RPN calculator program and it will be used in the language I am currently developing, Commando Basic. FTC BASIC is a compiler and Commando Basic will be a tokenized interpreter whereas Craft Basic and Tiny Craft Basic are direct interpreters.
I am doing everything pretty much from scratch, reinventing the wheel to learn the most that I can. The result is I have made BASIC like languages with the goal of having the most important BASIC commands. My languages are like custom Tiny BASICs with bonus features.
FTCBASIC supports strings (to an extent) and Commando Basic does as well. I plan to add some string support to Craft Basic as well.
It apparently gets a little confused by the comma, as it then prints:
In Craft Basic and Tiny Craft Basic, print outputs may be combined using commas. To display a comma, use the COMMA keyword. There's also QUOTE and NEWLINE keywords to insert double quote or a new line.
Example
Code: Select all
PRINT "Hello", COMMA, " World! ", 2 + 10 / 2, NEWLINE, "and here is another line"
In this last update to Tiny Craft Basic, I added the TAB keyword to insert tabs. This allows for better print formatting. I will add this keyword to the next version of Craft Basic for windows. The TAB keyword replaces having both ; and , in PRINT statements.
Example
Code: Select all
10 PRINT i, TAB,
20 LET i = i + 1
30 IF i < 100 THEN 10