User:Melab/Esoteric Languages/Language Number One

From Esolang
Jump to navigation Jump to search

This is going to be my first esoteric programming language. When I haven't named it it will be under http://esolangs.org/wiki/User:Melab/Esoteric_Languages/Language_Number_{Chronological Number}.

Language Syntax and Examples

Syntax

Here is the syntax:

|number  |opcode  |
|////////|begin   |
|///////\|plus    |
|//////\/|minus   |
|//////\\|multiply|
|/////\//|divide  |
|\\\\\\\\|end     |
|/////\/\|beginvar| (begin the variable function)
|/////\\/|endvar  | (end name of the variable function)
|/////\\\|varname>|
|////\///|<varname|
|////\//\|varvalu>|
|////\/\/|<varvalu|
|////\/\\|string> |
|////\\//|<string |
|\\\\\\\\|end     |

This the the syntax to tell if it is + or -:

|pos/neg |value   |
|positive|00000000|
|negative|11111111|

The digits after the opcode and the +/- digits are the operands:

0   |1   |2   |3   |4   |5   |6   |7   |8   |9   |
0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|

So the number 79 is 01111001.

All in all it follows a basic form:

|opcode  | + or - |operands or string values have no limited length
|........|........|.................->
'.' is repepresenting character places

Strings

Examples

You get four decimal digits in binary so //////\\ 00000000 00010000 00000000 is storevar +10000. However you need it assigned to a variable so you would write:

///\\\\\ 00000000 00000000 00000000
begin variable name
00000001 or it could be 00100100 00000000
can be any combination of different bytes
\\\/////  00000000 00000000 00000000
end of the name of the variable

When it is put altogether the result is:

| //////\\ 00000000 00010000 00000000 | ///\\\\\ 00000000 00000000 00000000 | 00100100 00000000 | \\\/////  00000000 00000000 00000000 | 
|store the number +10000 as a variable|it is stored in the variable name    | Variable: 2400    | that is the variable's name          |
'|' not included in code