hello,

thanks :)

the good for me :
just this !!
-------------------------------------------------
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>

 #include <Eina.h>

 int main(void)
 {
char buf[32];
double n = 40.56;

sprintf(buf, "%.2f MO", n);

printf("%s\n",buf);

    return EXIT_SUCCESS;
 }
-------------------------------------------------

so i can't understand what is for the 
eina_convert_dtoa(val, tmp);//Convert a double to a string
and all convert function of eina ?


thanks






Le mardi 10 août 2010 à 11:40 +0200, Cedric BAIL a écrit :
> On Tue, Aug 10, 2010 at 11:22 AM, Issa <frechdes...@gmail.com> wrote:
> > i have take the code exemple on the documentation and i m just trying to
> > "concatene" a double to a string.
> > i have this
> > double val = 40.56;
> >  char *s1 = " Mo";
> >
> > and for the final i want this
> > 40.56 MO
> 
> This is not the result you will get with eina_convert something like
> "0x0.8p+0", that you could concatenate with "Mo". Not really what you
> are looking for I think :-)
> 
> Better just do a snprintf(buf, sizeof (buf), "%f Mo", val); This will
> do the job you are looking for I think.



------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to