home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!unix!mxmora
- From: mxmora@unix.SRI.COM (Matt Mora)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: incrementation differences/THINK C 4.0 vs. 5.0
- Message-ID: <38188@unix.SRI.COM>
- Date: 27 Aug 92 23:01:39 GMT
- References: <D2150035.c21d0r@outpost.SF-Bay.org> <1992Aug27.182157.16567@qualcomm.com>
- Organization: SRI International, Menlo Park, California
- Lines: 52
-
- In article <1992Aug27.182157.16567@qualcomm.com> sdorner@qualcom.qualcomm.com (Steve Dorner) writes:
-
- >You will never see a C compiler that does this, and if you do you won't
- >find me using it. C is too sparse. Fix the following fragment:
-
- > a=b=c d=e;
-
- >What goes between c and d? I can think of 3 possibilities.
-
-
- I entered that line into think c and it said "syntax error" which is
- what its supposed to do. It doesn't know what the hell I'm talking about
- and shouldn't do anthing in this case. But when I change it to
-
- a=b=c
- d=e;
-
- then it selects the first line and say's "Missing ";" ". It knows where
- the missing ";" should go. So it should ask me "Missing ';' at the end
- of this line. Should I add one and continue compiling?"
-
- "Add and Continue" or "Cancel"
-
- Of course you could give a bunch of special cases where it won't know what
- to do but why would you want to program like that anyway? :-)
-
-
- Is this not a common mistake forgetting the ";"?
-
- What about this common bug that I think even shut down ATT long distance
- system:
-
- if (a=b) {
- //then do something
- }
-
- When the programmer really meant a==b. Should there be a option to check
- if statements?
-
- Matt
-
-
-
-
-
-
-
- --
- ___________________________________________________________
- Matthew Mora | my Mac Matt_Mora@sri.com
- SRI International | my unix mxmora@unix.sri.com
- ___________________________________________________________
-