home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!sdd.hp.com!scd.hp.com!hplextra!hpfcso!hplvec!bayes
- From: bayes@hplvec.LVLD.HP.COM (Scott Bayes)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: dereferencing Handles( was Re: incrementation differences/THINK C 4.0 vs. 5.0)
- Message-ID: <830020@hplvec.LVLD.HP.COM>
- Date: 9 Sep 92 19:48:18 GMT
- References: <1992Aug25.150911.19008@bnr.ca>
- Organization: Hewlett-Packard Co., Loveland, CO
- Lines: 28
-
- > Your remaining choices are semi-colon, comma and =. In this case,
- > semi-colon and comma are semantically identical, so that's not much of a
- > problem. Deciding between = and the others is slightly tricky. You can
- > resolve this, in part, by seeing which variables have been initialized.
- > If only one of the five variables has been initialized, the answer is
- > almost certainly = (otherwise, you'd be assigning something to an
- > uninitialized variable). Similarly, if both c and e (for example) have
- > just been initialized, you're almost certainly missing a semi-colon.
- >
-
- How do I tell which ones are initialized?
-
- I might do this:
-
- extern void dosomething;
-
- dosomething(&c);
-
- Is c now initialized or not? How can the compiler tell?
-
- Lots of library routines do this kind of stuff.
-
- The problem I see is that we expect a compiler to be RIGHT. If it's
- not RIGHT, then development of my application and its stability are
- both at great risk. It's tough enough to get a compiler to produce
- rock-solid code, without having it guess.
-
- ScottB
-