Re: Origins of == in C

Tue, 25 Jul 1995 23:58:59 GMT

          From comp.compilers

Related articles
Origins of == in C (1995-07-20)
Re: Origins of == in C (Doug CHAPPELL) (1995-07-25)
Re: Origins of == in C (Brendan Gowing) (1995-07-26)
Re: Origins of == in C (1995-07-28)
Re: Origins of == in C (1995-07-31)
Re: Origins of == in C (1995-08-01)
Re: Origins of == in C (David Toland) (1995-08-03)
Re: Origins of == in C (Bas V._de Bakker) (1995-08-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Doug CHAPPELL <>
Keywords: C, design
Organization: Compilers Central
References: 95-07-135
Date: Tue, 25 Jul 1995 23:58:59 GMT

>The distinction between = and == in C has caused me no end of
>grief. I read in the introduction to _The C Programming
>Language_ by K&R that C's ancestory is BCPL -> B -> C. BCPL used
>:= for assignment and = for comparison. Could someone point me
>to a definition of B or explain how (and why) assignment and
>comparison migrated from what I consider a much safer form to
>the current error-prone form.

I think the extent of this problem depends on what languages you have used
before - I have only ever programmed extensively in C and not greatly troubled
by == and =.

There is a useful book on the development of C - I have grabbed the
details from our catalogue.

  Author Emery, Glyn
  Title BCPL and C / Glyn Emery
  Place Oxford [Oxfordshire] Boston
  Publisher Blackwell Scientific Publications
  Publish Date 1986
  Collation 173 p. : ill ; 24 cm.
  Subjects BCPL (Computer program language)
                   C (Computer program language)
  Notes Includes index
  Bibliographic no 00451103
  Local Control no h07884
  Series (Computer science texts)
  Isn 0632016078 0632015713

Also the web site has some information on the
development of BCPL->B->C. Note: - Dennis Ritchie on the develop-
ment of the C language. - Clive Feather on BCPL - Alan Watson
on BCPL - Mark Brader on B - Dennis Ritchie on
precedence of '|', '&' and '=='

I hope you may find something of use amongst these documents.

| Dr Doug Chappell |
| Department of Biochemistry |
| The University of Sydney, 2006 |
| Phone: 61-2-692-2511 |
| Facsimile: 61-2-692-4726 |
| Email: |

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.