home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11739 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!darwin.sura.net!mips!mips!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: boolean (was: Re: typedef vs enum)
  5. Message-ID: <1992Jul29.171251.29521@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <23239@alice.att.com> <1992Jul20.032111.22387@ucc.su.OZ.AU> <RJBODKIN.92Jul27182159@lister.lcs.mit.edu>
  10. Date: Wed, 29 Jul 1992 17:12:51 GMT
  11. Lines: 19
  12.  
  13. In article <RJBODKIN.92Jul27182159@lister.lcs.mit.edu> rjbodkin@theory.lcs.mit.edu (Ronald Bodkin) writes:
  14. >In article <1992Jul20.032111.22387@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  15. >   NOW if you add f(bool), it gets called by preference.
  16. >
  17. >    But then f(23) becomes f(TRUE), which might still cause
  18. >problems, as in:
  19. >int condition(int errno); // 0 = no error
  20. >int condition(bool ok); // TRUE = no error
  21. >        Ron
  22.  
  23. I dont understand. In my proposal, condition(int) is always called
  24. unless an expression of bool type is used. 23 is an int. 
  25. The only problem is 'what is 0'? since it is not really an int,
  26. but an overloaded constant. 
  27. -- 
  28. ;----------------------------------------------------------------------
  29.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  30.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  31. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  32.