Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!ll-xn!adelie!munsell!jwf
From: jwf@munsell.UUCP (Jim Franklin)
Newsgroups: comp.lang.c
Subject: Re: #define ONE 1
Message-ID: <1125@wyszecki.munsell.UUCP>
Date: Thu, 16-Jul-87 09:47:38 EDT
Article-I.D.: wyszecki.1125
Posted: Thu Jul 16 09:47:38 1987
Date-Received: Sat, 18-Jul-87 09:07:11 EDT
Organization: Eikonix Corp., Bedford, MA
Lines: 23

gea@romeo.caltech.edu writes:
> Also, it can lead to nonsense like `#define ONE 1' from people who don't
> understand -- I had to change one of these once, and I did _not_ change it
> to `#define ONE 2'. ;-)

Don't laugh.  I had the misfortune to be modifying an assembly language
program at Bell Labs in the late 70's.  The person who wrote it was told
to use equates for all constants, so there were things like

        la      a4,six(a4)     ; get ^ to next table entry

But the table entry wasn't 6 bytes long, I checked that out.  So I
found the equate for "six".  Some bozo had changed the table size and
then changed the equate to

six     .equ    10

Niagara Falls!  Slowly I turned, step by step, inch by inch ...
-----
{harvard!adelie,{decvax,allegra,talcott}!encore}!munsell!jwf

Jim Franklin, Eikonix Corp., 23 Crosby Drive, Bedford, MA 01730
Phone: (617) 663-2115 x415