@NUM

From Esolang
Jump to navigation Jump to search

@NUM

@NUM is my first programming language (the name is based on the structure of the code). The language itself consists of a syntax of 12 "words". @NUM is based on the size and simplicity of Brainf***, but adds the ability for dynamic memory manipulation. This language uses a cell based memory system and can technically have methods!

Symbols Purpose?
# sets current address to the number on the right
@ sets current cell value to the number on the right(only positive permitted)
+ increments current cell value by one
- decrements current cell value by one
, returns current point in input (the ascii number of the character)
$ prints current cell value (in ascii)
! prints current cell value (the integer value)
= {} if the number to the right of the ? is equal to the current cell value, then the code inside is the {} performed, otherwise it is skipped
> {} if the number to the right of the > is greater than the current cell value, then the code inside is the {} performed, otherwise it is skipped
< {} if the number to the right of the < is less than the current cell value, then the code inside is the {} performed, otherwise it is skipped
E {} while the number to the right of the E is equal to the current cell value, then the code inside is the {} performed, otherwise it is skipped
G {} while the number to the right of the G is greater than the current cell value, then the code inside is the {} performed, otherwise it is skipped
L {} while the number to the right of the L is less than the current cell value, then the code inside is the {} performed, otherwise it is skipped
F {} for 0 to the number to the right of the F is less than the current cell value, then the code inside is the {} performed, otherwise it is skipped, sets current index to it's iterative index (0 to num)
% the number on the right of this is the address of a cell, and the % sign returns the value of that cell(valid as return number for all syntax requiring it)
i returns the length of input
^ returns square of number on the right
: returns current cell address

To Do

I just need to finish my interpreter, which has a couple bugs, and then make some examples