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

  1. Path: sparky!uunet!mcsun!uknet!mucs!m1!bevan
  2. From: bevan@cs.man.ac.uk (Stephen J Bevan)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: languages which allow the introduction of new operators
  5. Message-ID: <BEVAN.92Nov13093224@beluga.cs.man.ac.uk>
  6. Date: 13 Nov 92 09:32:24 GMT
  7. References: <veit.721491920@du9ds3> <TB06.92Nov11165010@CS1.CC.Lehigh.EDU>
  8.     <1992Nov12.082643.8415@arb-phys.uni-dortmund.de>
  9.     <BxLxqu.96C@mentor.cc.purdue.edu>
  10. Sender: newsman@cs.man.ac.uk
  11. Organization: Department of Computer Science, University of Manchester
  12. Lines: 15
  13. In-reply-to: hrubin@pop.stat.purdue.edu's message of 12 Nov 92 14:32:54 GMT
  14.  
  15. In article <BxLxqu.96C@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  16.  
  17.    Some of these allow some flexibility in expression syntax.  But how
  18.    many of these could conveniently unpack a floating point number into
  19.    its exponent and mantissa?  In particular, could you write
  20.  
  21.        exponent, mantissa =.U float
  22.  
  23. Since you didn't explain the notation, I assume that ".U" means "unpack"
  24. (why the "."?).  Therefore, in Haskell :-
  25.  
  26.   let (exponent, mantissa) = unpack float
  27.   in ...
  28.  
  29. bevan
  30.