Just for fun brainfuck'a'like textprocessor
Gregor Kopp
gk at cutcopy.com
Wed May 23 01:23:33 PDT 2007
janderson wrote:
> Nice work!
thank you!
just for safety: change the part handling the case '[': to:
case '[':
klammernstack.push(kommandoindex);
break;
got braindamage yesterday...
I tried to compile Gregor Richtards version with dmd 1.014 on windows
xp, but it didn't work:
D:\>dmd ctbf.d
ctbf.d(62): Error: need -Jpath switch to import text file helloworld.bf
ctbf.d(62): Error: cannot evaluate ctbf("") at compile time
ctbf.d(62): Error: argument to mixin must be a string, not (ctbf(""))
helloworld.bf did exist in the same directory with the following content:
,[.,]
This brainfuck program should print what you type in, till you kill the
brainfuck interpreter.
I fiddled around with din, cget(stdin), getchar, fflush(stdin) and so
on... but I didn't get managed, that a console program just read a
keystroke and continues. It always wants a linebreak.
I readed in several c-book, they say:
fflush(stdin) isn't covered completely in ansi standard, so it's
behaviour may change from system to system.
Hm. difficulty to implement the , then...
More information about the Digitalmars-d-learn
mailing list