RosettaCodeData/Task/Execute-Brain-/Zkl/execute-brain--2.zkl

28 lines
980 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
// print Hello World!
bf("++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++.."
"+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.");
// print @
bf(">>++++[<++++[<++++>-]>-]<<.[-]++++++++++.");
// read 3 characters, inc by 1 and print: "abc"-->"bcd"
bf(",>,>,><<<[+.>]","abc"); println();
bf(",>++++++[<-------->-],[<+>-]<.","23"); println(); // add two digits
// "Enter your name:", prints name backwards
bf(">+++++++++++++++++++++++++++++++++++++++++"
"++++++++++++++++++++++++++++.++++++++++++++"
"+++++++++++++++++++++++++++.++++++.-------------"
"--.+++++++++++++.>++++++++++++++++++++++++++"
"++++++.<+++++++.----------.++++++.---.>.<----.----------"
"---.++++++++++++.--------.-----------------------------------"
"--------.>.<>>>+[>,----------]++++++++++.<[+++++++++"
"+.<][<]","Sam Iam\n");
// word count
bf(File("wc.b").read(),"This\n is a test");
// rot13
bf(File("rot13.b").read(),"This is a test 123");