comp.lang.ada
 help / color / mirror / Atom feed
From: je@unix.brighton.ac.uk (John English)
Subject: Re: Function call or variable?
Date: 23 Mar 93 16:02:13 GMT
Date: 1993-03-23T16:02:13+00:00	[thread overview]
Message-ID: <1993Mar23.160213.4246@unix.brighton.ac.uk> (raw)
In-Reply-To: EACHUS.93Mar17185831@spectre.mitre.org

eachus@spectre.mitre.org (Robert I. Eachus) writes:
:   > Not necessarily.  You could use #define to ensure that the program is
:   > changed in only one place.  I don't believe I've ever seen any C code
:   > that's designed like this, though.
: 
:   No, no, no.  I have seen C code like this, and I have seen people
: use #defines to change things.  And I have seen the code compile
: cleanly and work in simple cases but break horribly later.

These days any sensible C programmer uses "const", not "#define".
Avoids headaches without aspirin.
-- 
-------------------------------------------------------------------------------
John English                    | "There are basically two types of dicks,
Dept. of Computing              |  hard dicks and floppy dicks."
University of Brighton          |    -- from a student essay on storage media
E-mail: je@unix.brighton.ac.uk  | "Disks are divided into sex & tractors."
Fax:    0273 642405             |    -- from one of my lectures (on a bad day)
-------------------------------------------------------------------------------



  reply	other threads:[~1993-03-23 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-17 23:58 Function call or variable? Robert I. Eachus
1993-03-23 16:02 ` John English [this message]
1993-03-24  2:10   ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1993-03-05 23:31 Thomas Huynh
1993-03-07 20:27 ` Alex Blakemore
1993-03-08  0:34   ` David Emery
1993-03-13  0:39   ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox