home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16327 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.2 KB

  1. Path: sparky!uunet!know!cass.ma02.bull.com!think.com!spool.mu.edu!sgiblab!munnari.oz.au!sol.deakin.OZ.AU!news.cs.uow.edu.au!cssc-syd.tansu.com.au!pete
  2. From: pete@cssc-syd.tansu.com.au (Peter Alexander Merel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Proposal - enhancement for switch statement.
  5. Summary: switch could be painlessly beefed up
  6. Message-ID: <1992Nov15.190830.11622@cssc-syd.tansu.com.au>
  7. Date: 15 Nov 92 19:08:30 GMT
  8. Organization: AOTC - CSSC
  9. Lines: 20
  10.  
  11. Before I describe what occurred to me, yes folks I know that a switch is not
  12. as useful as a virtual function.
  13.  
  14. But what I'd like for a snippet I'm working on at the moment would be for
  15. switch to use operator== rather than relying on conversion to int, so that 
  16. I could use it to test cases on objects rather than building an industrial 
  17. strength if statement. 
  18.  
  19. And no, the class in question won't go onto int.
  20.  
  21. This should be language compatible with the C usage, and not too hard
  22. for translaters to do just by translating into the aforementioned 
  23. industrial if.
  24.  
  25. Any chance?
  26.  
  27. -- 
  28. Internet: pete@cssc-syd.tansu.com.au   UUCP: {uunet,mcvax}!munnari!cssc-syd!pete
  29. Snail: 1/18-20 Orion Road, Lane Cove NSW 2066 Australia    Phone: +61 2 911 3130
  30. I am a big pond in a small fish.
  31.