With the advent of the new version, added to mat:
- Added comparison operations:
>
,<
,>=
,<=
,=
,!=
. - Added cmpr command.
- Added if-else branching.
Undoubtedly, there are already a lot of programming languages in our world, but mat is not intended for developing programs, it is a research language that i created it for the purpose of research of automaton programming.
mat -- is a research (experimental) automaton programming language. The main tool of this language is the switching modes (states) of the machine.
The only syntactic rule of the language is the separation of characters of the same type, others, if they are not one character. For example: '53' if it is assumed that '53' are separate numbers 5 and 3, then separate them, for example, with a space!
In mat terminology, the term 'state' denotes a way to process input data, for example, if you switch to the 'add' state, then all input data (numbers) will add up, but if you switch to the 'output to screen' state, the input data will be output to screen.
An important feature of the mat language is the absence of variables, almost all data is stored on the stack.
Hello world:
output
Hello world!
Here, in the first line, we put the automaton in the "output state", and after that we transmit the data, that is, the phrase "Hello World!"
An important reminder: after setting the state, everything that is not a command for changing the state is considered data.
The mat language has 2 implementations: mpi (mat file interpreter) and mi2 (interactive mat interpreter). The first mfi is a Mat interpreter that executes code from a file, and the mi2 interpreter works interactively.