Re: Origins of == in C

Doug CHAPPELL <D.Chappell@biochem.usyd.edu.au>
Tue, 25 Jul 1995 23:58:59 GMT

          From comp.compilers

Related articles
Origins of == in C jpowers@ti.com (1995-07-20)
Re: Origins of == in C D.Chappell@biochem.usyd.edu.au (Doug CHAPPELL) (1995-07-25)
Re: Origins of == in C Brendan.Gowing@cs.tcd.ie (Brendan Gowing) (1995-07-26)
Re: Origins of == in C peter.schurek@banyan.siemens.co.at (1995-07-28)
Re: Origins of == in C schrod@iti.informatik.th-darmstadt.de (1995-07-31)
Re: Origins of == in C jmccarty@spdmail.spd.dsccc.com (1995-08-01)
Re: Origins of == in C det@sw.stratus.com (David Toland) (1995-08-03)
Re: Origins of == in C bas@phys.uva.nl (Bas V._de Bakker) (1995-08-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Doug CHAPPELL <D.Chappell@biochem.usyd.edu.au>
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 http://sf.www.lysator.liu.se/c/ has some information on the
development of BCPL->B->C. Note:
http://www.lysator.liu.se/c/chistory.ps - Dennis Ritchie on the develop-
ment of the C language.
http://www.lysator.liu.se/c/clive-on-bcpl.html - Clive Feather on BCPL
http://www.lysator.liu.se/c/alan-on-bcpl.html#bcpl-main - Alan Watson
on BCPL
http://www.lysator.liu.se/c/msb-on-b.html#main - Mark Brader on B
http://www.lysator.liu.se/c/dmr-on-or.html#main - Dennis Ritchie on
precedence of '|', '&' and '=='


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


Doug
|--------------------------------------------|
| Dr Doug Chappell |
| Department of Biochemistry |
| The University of Sydney, 2006 |
| NSW AUSTRALIA |
| Phone: 61-2-692-2511 |
| Facsimile: 61-2-692-4726 |
| Email: D.Chappell@biochem.usyd.edu.au |
--


Post a followup to this message

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