home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15332 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.4 KB  |  39 lines

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