www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/02:23:31

Date: Mon, 24 Feb 1997 02:09:10 -0500 (EST)
From: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
To: Michael Dylan Ryan <mdr6 AT dana DOT ucc DOT nau DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Converting Float to String...
In-Reply-To: <5eqq5r$kkt@ruby.ucc.nau.edu>
Message-ID: <Pine.GSO.3.95.970224020739.18880A-100000@hops.cs.jhu.edu>
MIME-Version: 1.0

On 24 Feb 1997, Michael Dylan Ryan wrote:

> 
> Can someone tell me if there is a function to convert a floating point
> number to a string in DJGPP 2.0.  I can not find one.  In borland it is
> FCVT().  Please help.... thanks

What's wrong with using sprintf()?  It's exceptionally safe and versatile,
and it's ANSI (so it's also universal).  Try something like:
	sprintf(my_string, "%f", my_floating_point_number);

> 
> --
> Michael D. Ryan [Dark Brotherhood Software]
> Email: dbrotherhood AT geocities DOT com
>        mdr6 AT dana DOT ucc DOT nau DOT edu
>        TheShogun AT aol DOT com
> Programming Page:  http://www.geocities.com/SiliconValley/Pines/5301/
> --
> 


						---Michael Phelps
						   morphine AT cs DOT jhu DOT edu


                               CH3
                               |
                               N
                             / |
                     ______/   |
                    /      \   CH2
             _____/         \__|__      
           //     \\        /  |  \\     
         //        \\______/___CH2 \\  
          \        /       \       /
           \______/         \_____/
          / ------ \       /      \
        OH           \   /         OH
                       O
 
                   Morphine



- Raw text -


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