Just for fun brainfuck'a'like textprocessor

janderson askme at me.com
Wed May 23 23:36:03 PDT 2007


Gregor Kopp wrote:
> 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

 From spec http://www.digitalmars.com/d/dcompiler.html
"
-Jpath
     where to look for files for ImportExpressions. This switch is 
required in order to use ImportExpressions. path is a ; separated list 
of paths. Multiple -J's can be used, and the paths are searched in the 
same order.
"

You need to say where the helloworld.bf lives since it writes the 
brainfucked program at compile time. (ie the outputted binary is the 
compiled 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(""))

Probably related to the first error.

> 
> helloworld.bf did exist in the same directory with the following content:
> 
> ,[.,]
> 

I hope that helped.


More information about the Digitalmars-d-learn mailing list