'interbasic

From Esolang
(Redirected from 'basic)
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

'interbasic was a try to make basic better, but fails misrebly. The esolang was made by User:Ractangle

Commands

Code Meaning
VAR Creates/Edits the variable.
READ Puts the numbers/variables to the data stack. If it's not a number/variable, a syntax error will be risen.
DATA Outputs the top value in the data stack with poping.
CHOSE Same as DATA but the index is set to the command's argument.
IF...UNLESS Condition commands. The number lines just HAS to stay the same as the previos line. Unless you wan't to end this command.
USER Gets user input and puts it to the data stack.
NOTE Comment. Ignores the folowing charecters in the line.
EXECUTE Must be putten after every IF...UNLESS command. It must be in the start of the program too. And needs to be putten bettwen line if you want to make a one-liner (that excludes the NOTE command)
:<label> Goto statement.
.<label> Create a label.

'interbasic = representations

Symbol Name Action (VAR) Action (IF...UNLESS)
-- Least? Turns the variable into an integer Checks if the number is lower
== Normal? Creates a varable Checks if the number is "Normal"
≡≡ Most? Edits the value Checks if the number is higher

Examples

Hello World

1 EXECUTE VAR hw == "Hello world"
2 READ hw
3 DATA

Truth-machine

1 EXECUTE READ 0,1
2 VAR i -- USER
3 IF i == 0 EXECUTE CHOSE 0
4 EXECUTE UNLESS i ≡≡ 0
4 .r
4 DATA
4 READ 1
4 :r

Infinite loop

1 .0 EXECUTE :0