home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / misc / 3625 < prev    next >
Encoding:
Text File  |  1992-11-13  |  1.9 KB  |  36 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!gmd.de!Germany.EU.net!ifado!wb
  3. From: wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke)
  4. Subject: Re: languages which allow the introduction of new operators
  5. Message-ID: <1992Nov13.073809.11835@arb-phys.uni-dortmund.de>
  6. Organization: Institut f. Arbeitsphysiologie a.d. Uni Dortmund
  7. References: <TB06.92Nov11165010@CS1.CC.Lehigh.EDU> <1992Nov12.082643.8415@arb-phys.uni-dortmund.de> <BxLxqu.96C@mentor.cc.purdue.edu>
  8. Date: Fri, 13 Nov 92 07:38:09 GMT
  9. Lines: 25
  10.  
  11. In article <BxLxqu.96C@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  12. >In article <1992Nov12.082643.8415@arb-phys.uni-dortmund.de> wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke) writes:
  13. >>Add Ada, Algol68, TeX as well.
  14. >
  15. >Some of these allow some flexibility in expression syntax.  But how
  16. >many of these could conveniently unpack a floating point number into
  17. >its exponent and mantissa?  In particular, could you write
  18. >
  19. >    exponent, mantissa =.U float
  20. If this is the point, there is some clarification needed. You want to
  21. have a result which is really *2* values. Most languages don't allow
  22. this. You need a (possibly implicitly constructed) structure to make
  23. this sort of assignment possible. Defining an unary operator which
  24. returns a struct is possible at least in C++ and Algol68. As we know
  25. Herman is interested in *very* efficient solutions, one could trie C++
  26. with embedded asm code (conditionalised for the machines on which it can
  27. be used) in the operator definition. If GNU C++ is this operator may be
  28. even onlined. The syntax has to be changed to something like
  29. struct {int exponent; double mantissa} e_m;
  30. e_m Isplittedfrom floatvalue;
  31. if the operator is called Isplittedfrom.
  32. -- 
  33. Dipl.-Math. Wilhelm Bernhard Kloke,
  34. Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
  35. Ardeystrasse 67, D-4600 Dortmund 1, Tel. 0231-1084-257
  36.