I am on osx. I found this http://neugierig.org/software/c-repl/ but the links on that page for code seem to be broken.
Many programming languages come with a REPL (read-eval-print loop), which allows you to type in code line by line and see what it does. This is quite useful for prototyping, experimentation, and debugging code. Other programming languages, and especially C, use a "compile-run" model, and don't provide a REPL.
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.
Repl.it uses Clang compiler in C programming language...
A Read-Eval-Print Loop, or REPL, is a computer environment where user inputs are read and evaluated, and then the results are returned to the user. REPLs provide an interactive environment to explore tools available in specific environments or programming languages.
Just found the IGCC (Interactive GCC) REPL. I like it.
Example:
./igcc g++> int a = 1, b = 2; g++> printf("%d\n", a + b); 3 g++>
And it gives you compile errors like this:
g++> c = 3; [Compile error - type .e to see it.] g++> .e <stdin>:14:1: error: use of undeclared identifier 'c' c = 3; ^
(SF download: http://sourceforge.net/projects/igcc/files/)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With