home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 33 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mn5.swip.net!usenet
  2. From: roland.bengtsson@mbox3.swipnet.se (Roland Bengtsson)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Convert ASCII to IEEE
  5. Date: 1 Jan 1996 16:33:13 GMT
  6. Organization: -
  7. Message-ID: <1055.6574T1047T1274@mbox3.swipnet.se>
  8. NNTP-Posting-Host: dialup102-125.swipnet.se
  9. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  10.  
  11. Are there an easy way to read a stringgadget (ASCII) and then convert it to
  12. double IEEE-format. The only solution I found was first convert it fo FFP with afp()
  13. then to IEEE with SPTieee(), then to double IEEE with IEEEDPFieee() :-(
  14.  
  15. Like this:
  16.  
  17. double str2ie(UBYTE *string)
  18. {
  19.     return(IEEEDPFieee(SPTieee(afp(string))));
  20. }
  21.  
  22. If I have understand this, SAS/C floating point is the same as Motorolas FFP, but
  23. for other reasons I can't use FFP.
  24.  
  25. Any suggestions are welcome!
  26.  
  27.  
  28. -- 
  29.                               \|/
  30. Thor 2.22                     @ @
  31. +-------------------------oOO-(_)-OOo----------+
  32. |Amigaowner |                                  |
  33. |since 1988 |BBS:  O C C   B B S +46-35-187450 |
  34. |    _      |Fidonet> 2:203/802.6              |
  35. | _ //      |                                  |
  36. | \X/       |Falkenberg, Westcoast of Sweden   |
  37. |A3000/10MB |                                  |
  38. |280HD/28.8 |Please write where YOU live!      |
  39. +-----------+----------------------------------+
  40. AMIGA - Multimedia, Preemptive Multitasking
  41. Plug'n'Play since 1985.
  42.  
  43.  
  44.