This is my idea for a programming language. I came up with it during a free period at school. It will be implemented as an interpreter in C++. I tried to design it so that it would be easy to program the interpreter. That's why it is made up of combinations of single characters. It is almost impossible to understand without reading what each character means. Please comment on it.
Vars:
* There are variables a-z and a stack
* Each of the a-z variables has 5 data types (total of 130 vars; 26 per array)
* The data types are string, bool, int, long, char
The data types are accessed this way:
VS - vars.string
VB - vars.bool
VI - vars.integer
VL - vars.long
VC - vars.character
The stack is accessed like this:
SS - stack.size (for all data types)
ST - stack.type
SA - stack.add (same as push in assembly)
SR - stack.remove (same as pop)
SO - stack.obtain (get without popping; only for top stack item)
Examples:
VSA"Hello World!" - puts the string 'Hello World!' into vars.string.a
---------------------------
SS10 - stack is size 10
STB - changes to bool
Commands/Reserved Words (Chars)
CO - command.output
CI - command.input
CS - command.screen (mainly used to clear screen)
CCT - command.compare.true?
CCF - command.compare.false?
CCG - command.compare.greater?
CCL - command.compare.less?
CCE - command.compare.end
Example:
VIA350 - the integer a is set to 350
VSA"A is equal to 350." - the string a is set to ...
CCTVIA,350 - integer a is compared with 350
COVSA - if true, the string a is output
CCE - end compare
Loops:
For like loop:
>#3 (code goes here) < - loops three times
>VII (code goes here) < - loops i times
While like loop:
>CCTVBX,1 (code here) <CCE - loops while the bool x is true (1=true,0=false)
>CCGVIX,VIY (code here) <CCE - loops while int x is greater than int y
It can also be done like this:
>CCGVIX,VIY
....
....
....
<CCE
If you are still reading this, thank you. It is not even close to done. I think I may need to add semicolons or something to separate commands in a single line loop.
So what do you think?