SemicolonHash
Jump to navigation
Jump to search
;# (SemicolonHash) is a programming language created by PPCG user caird coinheringaahing. It has only two commands: ; - add one to the accumulator, and # modulo the accumulator by 127, convert to ASCII character and output without a newline. After this, reset the accumulator to 0.
Examples
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;# Output: ;#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;# Output: !
Interpreter
Perl
perl -043paF(?!^); -e '$_=/#/&&chr@F%127'
Python
control = 0
while True:
code = input('>> ')
for i in code:
control = control + 1 if i == ';' else chr(control % 127)
if i == '#':
print(control)
control = 0