www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/13/05:26:24

Date: Thu, 13 Jun 1996 17:25:10 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
Reply-To: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: Tom Wheeley <tomw AT tsys DOT demon DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Beginners srand error
In-Reply-To: <834616135snz@tsys.demon.co.uk>
Message-ID: <Pine.SGI.3.93.960613171425.1543A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

On Wed, 12 Jun 1996, Tom Wheeley wrote:

> 
> Undefined behaviour can result in absolutely anything, including what you
> expect.
> 

IME, it results in nonzero exit codes.. upsetting when your shell scripts
expect an ERRORLEVEL or exit code of 0 if everything's OK.

> > Either of my Dos text editor, edit or e, will not seemingly store
> > the tab character that is needed at the beginning of a make file 
> > command line. I had to resort to using a windows app. Is there
> > a way to configure either of these editors so I can write make files
> > with them.
> 
> I don't think so: I corrected lines with edlin!
> 

I used Edit.. until I knew better.. if I'm not mistaken, e has an option
to use tabs instead of embedded spaces.

> > Another question is to everyone: what is the best way to view
> > and edit all of your program files and still have access to dos
> > for the command line to make or run (aside from Rhide). What I've been doing
> > is opening files from windows with notepad and then editing them, but
> > the limitation of this is I can't save the changes easily. What is 
> > the best editor or editor of your choice to do this? (Also is there a djgpp
> > command line option to make and run at the same time?)
> 
> I use doskey and Edit.  Edit is a very poor editor for C programming, but I
> would think notepad is even worse!  Unfortunately I have to exit to compile,
> but with doskey I can open them up easily.  Also Alt-f,x ensures every file
> is saved.  Why can't Edit have Shell to DOS! :-(
> 
> Doskey makes typing those gcc command lines very easy for small programs,
> when you don't want to make a Makefile.

Well, if you've got nothing better.. ;)

But the BEST solution IMO is to get one of 'em Super-Editors which allow
you to shell out of the editor to compile, then grab GCC's stdout/stderr
so that the error messages (who doesn't have 'em) are displayed in another
window and you have almost-Borland-IDE interactivity.. if your CPU is fast
enough.

I'm sure Eli (and many others..) would frantically yell, "Emacs! Emacs!"
(no offense intended) and yes, I agree, Emacs is the Ultimate Super Editor
for this job, and Emacs-19.31 can be compiled OOB with DJGPP v2 making it
sort-of the Approved Editor for the Job.

But: Emacs is HUGE (protestations to the effect that it'll run in 4MB
notwithstanding). Yes, GNU Emacs will run in 4 MB, but just wait till you
shell out to run GCC (which also BTW requires 4 MB).. massive amounts of
disk thrashing.

I would humbly submit: use JED. Available at http://space.mit.edu/~davis

It doesn't have all the GNU Emacs features (mostly the TeX-related stuff)
but for editing C programs, it fills my needs most admirably. It also has
an Info-reader (like Emacs). I just haven't figured out how to read the
DJGPP Info files with it.. should be straightforward.

There you have it -- Info/documentation reader, primitive sort-of debugger
support, editor, shell to compiler. All in one. Sure beats Edit (*&%#%@#).
Not to mention TAB works. Welcome Makefiles!

NB: All this applies to Emacs as well! anything JED can do, Emacs can do
(probably) better, with something like a 300% increase in core memory
consumption.

Personally, I use JED on PC's, and Emacs on memory-rich, X Windows
machines (SGI, Sun) where Emacs really shines: it can detect X and morph
itself into a GUI-type editor with nice buttons and stuff.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019