![]() |
|
Hello World - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Hello World (/Thread-Hello-World--42979) |
RE: Hello World - slbmeh - 09-04-2012 In brainfuck... Code: >++++++++[<++++++++>-]<++++++++.>+++++[<+++++>-]<++++.>+++[<+++>-]<--..+++.>+++++++++[<--------->-]<++.>+++++++[<+++++++>-]<++++++.>+++++[<+++++>-]<-.+++.>++[<-->-]<--.>+++[<--->-]<+.>++++++++[<-------->-]<---.As said before, not very helpful... The following would be slightly more helpful: Brainfuck is a language similar to that of a turing machine. The syntax is as follows.
As always there are multiple ways to do hello world... I've primarily seen a single loop used to process all letters, I changed it up for my example.
This results in the loop running 8 times because we always end with our initially incremented value and decrement each time. This places a value of 64 in pointer 0.
And so on through each character being presented in the string "Hello world!". |