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