home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18134 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.2 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!ucbvax!ucdavis!taquito.engr.ucdavis.edu!cklarson
  2. From: cklarson@taquito.engr.ucdavis.edu (Christopher Klaus Larson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Help! Display an array...
  5. Message-ID: <18997@ucdavis.ucdavis.edu>
  6. Date: 7 Nov 92 18:44:24 GMT
  7. References: <seyL1ke00iUxQ3n9Bp@andrew.cmu.edu>
  8. Sender: usenet@ucdavis.ucdavis.edu
  9. Organization: College of Engineering - University of California - Davis
  10. Lines: 21
  11.  
  12. In article <seyL1ke00iUxQ3n9Bp@andrew.cmu.edu> bp11+@andrew.cmu.edu (Bijal S. Patel) writes:
  13.  
  14. >it seems that all the Mac functions that display to windows (e.g.
  15. >DrawChar, DrawString...) only deal with text.
  16. >
  17. >Does anyone know how I can convert an array of doubles into text form?
  18.  
  19. Use the function sprintf() to turn the double into a C string, then
  20. you can use DrawText(). Or, follow the call to sprintf() with a call
  21. to CtoPStr(), to convert the C string to a Pascal string, and then
  22. use DrawString().
  23.  
  24. >Is there any other way to display an array (or non-text) to a window
  25. >created by the program?
  26.  
  27. If you wish the output to be formatted like an array (3x3 in this case),
  28. consider using the List Manager (IM IV) to display the output.
  29.  
  30. --Chris
  31. (OK, so I need a real .signature)
  32. cklarson@engr.ucdavis.edu
  33.