www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/03/19:01:30

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP newbie..C newbie..
Date: 2 Nov 1997 02:58:17 GMT
Organization: Oxford University, England
Lines: 87
Message-ID: <63gq89$80v$2@news.ox.ac.uk>
References: <345BA25A DOT 3227 AT csinet DOT net>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 01 Nov 1997 13:42:50 -0800 in comp.os.msdos.djgpp Tim
<christim AT csinet DOT net> wrote:

: The choices I've given myself are C , C++ or Assembly... Although I'm
: more than a little wary about digging in with an assembler right off the
: bat (maybe I should take a course in computer science before I try
: that).

In that situation I would either learn C or C++. You can learn C++
after C, or vice-versa, but in the former case you'll probably end up
using C++ wrongly, and in the latter you'll probably get frustrated
with the extra syntax restrictions C has. In either case, you'd have
to be wary of the very subtle differences in the two languages; their
similarity to one another is deceptive.

Since I use C, everything I've written below is aimed in that
direction. If you intend to learn C++, you'd probably be better off
getting "The C++ Programming Language", by Bjarne Stroustrup, which is
effectively the definition of that language.

: Anyway, I've picked up DJGPP, all of the .zip's' and .exe's' that the
: Faq and readme files suggest, including the C compiler, GDB debugger and
: Rhide (It's still not too late to switch compilers though).

I'd suggest you stick with djgpp :).

: I've also found a few C and C++ tutorials on the web wich I'm studying
: religously, but have gone through a few and found myself craving a
: Language Reference with all of C's or C++'s operators, built-in
: functions and the like. Maybe someone can point me in the direction of
: something like this ?

C doesn't have any built-in functions; it has a handful of keywords
(about 32 IIRC) only. To do anything useful, you use `standard library
functions', which are really external functions, but are standard
across different compilers. For a function index, refer to the C
library documentation -- type `info libc', and either choose the
functional or alphabetical listing. Before doing this, of course, you
should learn to use the info browser.

: One more thing..Are there any books on the market that teaches
: programming in C for DOS 
: with DJGPP ?

You shouldn't think too much about programming for DOS. At least to
begin with, program in standard C, not specific to any operating
system. When you're proficient with the language, then you can think
about what you want to do with it; for some applications (e.g. game
programming) you need to know more about OS-specific techniques, and
at this stage you can start looking at non-portable methods.

There are no books published about djgpp yet, but any *correct* book
which teaches ANSI standard C should help you enormously. If the book
really is correct, the example programs, advice, etc, should all work
perfectly with djgpp. Avoid books that refer by name to any compiler,
at least to start with; these books will tend to teach non-portable
features of that compiler, which I think hinders your learning.

Also avoid any books which give a time period in their titles; you
never stop learning, in whatever you are doing, so claiming to be able
to teach everything in 21 days or, worse, 24 hours, is a blatant lie.

I'd hesitantly recommend "The C Programming Language", by Kernighan
and Ritchie, Second edition. It's a smallish book, which aims to
explain the language pretty concisely. It is `correct'. The reason I
hesitate is that I'm not sure how suitable it is for a beginner; it is
concise, so it doesn't overdo explanations. It also doesn't really
teach general programming technique. It's certainly a useful reference
book.

Other than that, look around, browse some books and see what seems to
you to be of the right level. Sadly some books, as I mentioned above,
are simply incorrect in many aspects; particularly those written with
a specific compiler in mind. Avoid them like the plague ;).

If/when you have questions about the C language, not about the djgpp
system itself, you should refer to the comp.lang.c FAQ first, and then
ask on comp.lang.c if your question is not answered. General language
questions are not on-topic in this newsgroup; it's meant for
djgpp-specific discussion.

Good luck!

-- 
Regards,

george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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