views:

30

answers:

1

How do i save an compile a program in befunge-93?
what do i need to save the file as? (like: fileName.what)
How do i compile it?

+1  A: 

Befunge is typically an interpreted language. In fact it was designed to be difficult to compile because the programs are self-modifying (but that hasn't stopped people from trying to write a compiler).

You should save the file however you like (a .bf extension is typically used) and run the interpreter (bef), passing the filename as a command line argument.

You can see the usage instructions in the source code for the interpreter.

Mark Byers
do i have an interpreter on my computer automatically though or do i have to download one? Where do i do this at?
David
@David: The reference implementation is found here: http://catseye.tc/projects/bef/. You download the source files and compile it using your favorite C compiler. There are some notes here: http://catseye.tc/about/prereqs.html#ansi_c
Mark Byers
@David: And I hope you are aware that Befunge is an esoteric / joke language? ;-)
Mark Byers
i am aware but i thought it might be fun to learn. I don't understnad how to use the intepreter. Is that source code you linked me to something i have to compile and run then? how do im compile it on my computer?
David
@David: Yes, you compile the source to get an executable called `bef`, or `bef.exe` on Windows, and you can run that from the command line to execute your Befunge source.
Mark Byers
how do i compile it though? i only know how to compile .java files with javac. im sort of new at this.
David