Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!ncar!ames!ads.com!killer!usenet From: anders@verity.com (Anders Wallgren) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawstring Question Message-ID: <1990Nov30.202807.6139@verity.com> Date: 30 Nov 90 20:28:07 GMT References: Sender: usenet@verity.com (USENET News) Reply-To: anders@verity.com (Anders Wallgren) Organization: Verity, Inc., Mountain View, CA Lines: 23 In-Reply-To: rg2c+@andrew.cmu.edu (Robert Nelson Gasch) In article , rg2c+@andrew (Robert Nelson Gasch) writes: >Now there is a new problem: >Since I am using a drawing Window as my output medium, I can not use >the standard output functions (printf). I want to display the values of >some variables though. Since I have to use DrawString, this seems to be >a problem. For example, how do I draw a properly formatted floating >point number?? Drawstring does not give you formatting options and >seems to require a string. How do you get around this ?? Any ideas?? > How about: fprintf(some_buffer, "%f", some_float); drawstring(some_buffer); (This assumes you have MPW C, which gives you void drawstring(char *s) but you could also convert the string to pascal and use DrawString. anders