delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/01/19:56:12

Date: Mon, 1 Dec 1997 18:54:51 -0600 (CST)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Jamie Love <jamie DOT love AT clear DOT net DOT nz>
cc: DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: converting floats to strings
In-Reply-To: <199712020026.NAA17553@fep1-orange.clear.net.nz>
Message-ID: <Pine.SUN.3.95.971201185324.27274A-100000@ernie.eecs.uic.edu>
MIME-Version: 1.0

On Wed, 3 Dec 1997, Jamie Love wrote:

you can use sprintf to do that
examples:
char text[250];
float f;
sprintf(text, "%f", f);

This works like a regular printf but instead of printing to screen it
prints to string.

I hope that helps.

> hi, my problem is summed up in the subject. Is there a function that can
> convert float variables to strings?
> 
> Jamie Love
> now on the web at http://www.geocities.com/SiliconValley/Horizon/4532
> e-mail me at jamie DOT love AT clear DOT net DOT nz
> 


                        ,,,
                       (0 0)
   +-------------oOO----(_)-------------------+
   |                Andrew Deren              |  
   |             aderen AT eecs DOT uic DOT edu          |
   | www.eecs.uic.edu/~aderen/ader/main.html  |
   +-------------------------oOO--------------+
                       || ||
                      ooO Ooo
 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019