Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a REPL for C programming? [closed]

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.

like image 483
Surya Avatar asked May 26 '12 14:05

Surya


People also ask

Does C have a REPL?

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.

What is an alternative name for 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.

What compiler does C use Replit?

Repl.it uses Clang compiler in C programming language...

What is a REPL in programming?

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.


1 Answers

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/)

like image 151
snd Avatar answered Sep 19 '22 18:09

snd