MSFE++

From Esolang
Jump to navigation Jump to search

It is an extended version of MiniStringFuck. Changed from only 2 operators to 3.We also added 2 bytes.Here are three operators in MSFE++.

+ operator: used to add one to the current byte.

- operator: new operator. Subtracts the current byte by 1 and moves to the next byte. If executed at the last byte, moves to the first byte.

Asterisk (*) operator: Iterates through the contents until the byte is 0.

Three minuses will output the current byte. Four will input the current byte.

And there is an interpreter.

a = [0,0,0]
o = 0
m = 0
def itp(c):
    global a,o,m
    for j,i in enumerate(c):
        if i=='+':
            a[o] += 1
            m = 0
        elif i=='-':
            a[o] -= 1
            o += 1
            o = o%3
            m += 1
            if m==3:
                print(chr(a[o]))
            if m==3 and c[j+1]=='-':
                a[o]=ord(input()[0])    
        elif i=='*':
            m=0
            while a[o]!=0:
                itp(c[j+1:c[j+1:].index('*')])        
itp('++++++++++++++++++++++++++++++++++++++++---')           

I think it is like BrainFuck,but,It isnt an unary...

smile everyday.