Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Wow! Edlin takes me back. Used it in my first computer language, BASIC.
Now I find it hiding in WindowsXP, and still working!!
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185
>this is what I started with my knowledge and so far ive got
What you started with your knowledge? Nah, you just copied it from C: The Complete Reference by Herbert Schildt .
tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
Quick question... How are you supposed to edit the test ?
That was one of the OP's questions in his original post.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
If what he wants is a LINE editor, then he should follow the functionality you can see in Edlin. That was a terrific suggestion from Ancient Dragon.
As far as editing, I'd definitely want to use a compiler with conio.h or ncurses, which have that getch() feature. Also, the gotoxy(), is there as well (although Windows gives you SetConsoleCursorPosition(), which does the same, but it's a bit clumsier). Couple that with wherex(), and wherey(), and you're off to a good start, imo.
The multi-line editor is the better editor, no doubt. The Edlin type (one line at a time) editor is the much easier one to program, however.
So he needs to decide what he wants.
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185
edlin was a really nice text editor for its time. I did all my C program using it for MS-DOS.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343