&-/

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

&-/ is an esolang made by emelchenko.

Commands

&-hlwr: prints "Hello World!".

&-halt: ends the program.

&-print: prints a string.

&-variable: declares a variable.

&-printv: prints a variable's value.

Implementation

Python

def ads(program):
  a=program.split("\n");var={}
  while a:
    b=a[0];c=b.split()
    if b=="&-hlwr":print("Hello World!")
    if b=="&-halt":break
    if b[0:8]=="&-print ":print(b[8:len(b)])
    if b[0:11]=="&-variable ":var[c[1]]=c[2]
    if b[0:9]=="&-printv ":print(var[b[9:len(b)]])
    a.pop(0)
ads("""""")