home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14653 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.6 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!swrinde!network.ucsd.edu!qualcom.qualcomm.com!qualcom.qualcomm.com!sdorner
  2. From: sdorner@qualcom.qualcomm.com (Steve Dorner)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: incrementation differences/THINK C 4.0 vs. 5.0
  5. Message-ID: <1992Aug28.130710.18938@qualcomm.com>
  6. Date: 28 Aug 92 13:07:10 GMT
  7. References: <D2150035.c21d0r@outpost.SF-Bay.org> <1992Aug27.182157.16567@qualcomm.com> <38188@unix.SRI.COM>
  8. Sender: news@qualcomm.com
  9. Organization: Qualcomm, Inc., San Diego, CA
  10. Lines: 28
  11. Nntp-Posting-Host: qualcom.qualcomm.com
  12.  
  13. mxmora@unix.SRI.COM (Matt Mora) writes:
  14. >Steve Dorner writes:
  15. >>    a=b=c d=e;
  16. >I entered that line into think c and it said "syntax error" which is
  17. >  a=b=c
  18. >  d=e;
  19. >then it selects the first line and say's "Missing ";" ". It knows where
  20. >the missing ";" should go.
  21.  
  22. It does *not* know where the missing ";" should go.  It knows where
  23. something is missing.  An '=' would be a perfectly good choice, too.
  24.  
  25. >if (a=b) {
  26. >When the programmer really meant a==b. Should there be a option to check
  27. >if statements?
  28.  
  29. "When the programmer really meant a==b" is the trick.  I write if
  30. statements like your example all the time, and I mean them.
  31.  
  32. I can't use the MPW C compiler's full warnings, because all it does is
  33. whine constantly about this particular idiom.  What I'm really looking
  34. for is lost in reams of dreck.  If you're going to add such
  35. warnings to a C compiler, you have to make them individually
  36. selectable; having an "Anal Retentive" checkbox just doesn't cut it.
  37. Finer control is necessary.  
  38. -- 
  39. Steve Dorner, Qualcomm, Inc.
  40. Yes, I'm still working on Eudora and it's still free.
  41.