From Esolang
Jump to navigation Jump to search

O.S.M is a esolang made by User:Yayimhere where the program can only self modify. The name stands for only self modify. O.S.M does not include variables but if a number is put on a line with F then it is remembered as a variable


Newline: add a new line at the bottom of the file
#(): add whats in the brackets to the bottom of the page
0newline: make a newline at the top of the page
0#(): add whats in brackets to the top line
_#(): add whats in the brackets to the line it is on
%#(): put whats in the brackets at a random line
()#(): out whats in the second brackets on the line specified by the number in the second brackets
F: out in front of any # operation and the number in the second brackets will be stored as a variable pn that  line
R(): r means read and reads line inside the brackets. It has all the variants of #() for pointing to a line.
(r variant)++(r variant): plus together the numbers in the brackets
!: put at the end of R to add it to a spesific line. It also has all the variants that #() has
I: user input. Can be used inside #()and its variants
^: move current line
V: move current line down

if statement logic

To start a if statement you write:

(Some r variant) something to check (some r variant)

This is all the things you can check with:

=: equal too
*: is one a multiple of the other(only numbers)
>>: more than(only numbers)
<<: less than(only numbers)

All the only numbers has a l variant that checks it based on the length of the text and a iii variant for the total ascii value of the text


If statement example:

(%r) * (%r)

Simple program: