I have been making a program that outputs each character before a given one to the screen, but... I've been doing it with Brainfuck! :)
I would like to be able to input a character, and see all the characters that come before it. The code I have so far only outputs a space and then waits for the next key press before exiting.
++++++++
[>+++++++++<-]>.>++++++++++[>++++++++++<-]>+.+++++++..+++.>
++++++++[>++++<-]>.>++++++++[>++++++++++++<-]>+.+++ ++++++++++.
----------.>++++++++[>++++<-]>.>++++++++++
[>++++++++<-]>+++++++.
++++++++++++++.>+++++++++[>++++++++++++<-]>.---------.>
++++++++++[>+++++++++++<-]>+.--.--------.>+++
[>++++++++++<-]>+++.>++++++++++
..>+[,[>+>+<<-][>>-<<+>>]>[[-.]<]],
I've tried for ages to figure out what's wrong with this code, but everything I've done has messed it up.
Works for me, try this BF interpreter