If a==1:
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.
If a==1: is esoteric programming language, where program ends correctly, if accumulator==1, but if accumulator!=1, program outputs f"ERR: {a}".
Commands
command | description |
---|---|
+ | inc |
- | dec |
. | out |
Dont confuse commands with BittyLang
Interpreter in python
a=0 for c in input(): if c==".": print(a) if c=="+": a+=1 if c=="-": a-=1 if a==1: break if a!=1 print("ERR:", a) break
Examples
XKCD Random Number
++++.
XKCD Random Number without ERR
++++.---