C is a textual computer language. It supposes
a sequence of characters organized in definitions.
Nothing is said in the standard about the way to
input a C program, but the problem is not new,
and text editors aren't new either.
My first text editor was ed, a Unix program
that would take a file name, and print nothing.
There wasn't even a prompt.
This was a good user interface when you were
connected to the computer through a slow
serial line, and the display was printed paper,
in some printer attached to the machine.
It was a powerful editor, introducing a "regular
expressions" feature that worked amazingly well.
Later, I used a visual editor, that I use even
today (as I use still ed).
But an editor for the C language needs special features
that a simple text editor doesn't provide.
One of the first ones I added to my editor, was the list
of functions the source code file has. You click in
one and the editor goes to that one.
Syntax coloring followed, together with many other features
that I think could be useful: slicing the code according
to a single variable, so you see where is initialized,
used, etc, without any other lines.
Usage of, shows the usages of a variable, selecting
the lines for you, so that you get easily from one
usage to the next with just a click.
One of the most difficult to do of course was "goto
definition". I have settled (I hope) now for an SQL
data base (sqlite, written in C) that stores the output
of a modified compiler that generates the browse info.
You can query the database with standard SQL commands,
indepently of the editor.
If you are a beginner, there is a wizard that will
write a skeleton program for you. A windowed one
if you wish to program a GUI.
Of course, if you write a program you will have some bugs.
There is a debugger too, that will follow the program
when it runs. The debugger uses the editor to scan the
text where you are running, and automatically shows
the variables the program is working with in an
"auto" window at the bottom. This spares you the
typing of variable names in most cases.
Of course there are more sophisticated programs available.
Visual Studio, of Microsoft, is 3GB in the last version,
and features a ton of languages/environments/debuggers/
back-ends/ etc. You can even do straight C with it, if you
try.
For people that like simplicity however, a simple language
(C) and a simple system are all that could be needed.
It is available at
http://www.cs.virginia.edu/~lcc-win32.
jacob