delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/18/10:42:40

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Stupid DJGPP questions
Date: Mon, 18 Dec 2000 15:29:04 +0000
Organization: Customer of Energis Squared
Lines: 27
Message-ID: <u8bs3tgbquav2gfob1u0t15msith3kmpga@4ax.com>
References: <000201c06898$cc564f20$735c149a AT mitchllistar DOT ca> <91l0jh$hcs$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
NNTP-Posting-Host: modem-117.einsteinium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news8.svr.pol.co.uk 977153361 2884 62.136.69.117 (18 Dec 2000 15:29:21 GMT)
NNTP-Posting-Date: 18 Dec 2000 15:29:21 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:

> Kevin Mitchell <mitchll AT istar DOT ca> wrote:

> >  What, on your system, are the restrictions on the pointer types char*,
> > int*, and void*? For example, may and int have an odd value? Hint:
> > alignment.
> 
> Sigh... and I had thought a book as widely respected as this one would
> know better than to meddle useless implementation details with those
> of the subject programming language.  You do not need to know the
> answer to any of these questions to write good C or C++ code.
> Actually, your code will probably be better if you *don't* know the
> answers to these questions.

I think Stroutrup's point is to make clear that compilers may differ
in implementation while still conforming to the standard, and that you
*do* need to be able to answer the questions, in a portable way,
rather than make assumptions.

The idea seems to be to write code (rather than simply ask in a
newsgroup).  It's a useful exercise, to discover sizeof(), <limits>,
etc., although you might consider maximum name length suspect
knowledge.

I doubt though, that VC++ would provide the answers "in about 3 mouse
clicks..."

- Raw text -


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