electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

how to convert float to string using HEW(renesas)


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> how to convert float to string using HEW(renesas)
Author Message
nesas



Joined: 25 May 2007
Posts: 2


Post15 Nov 2007 19:22   

how to convert float to string using HEW(renesas)


I am using renesas for learn more programming.

in library STDLID renesas have string to float (atof), but float to string (ftoa) dont exist...

how i can convert float to string??

thanx a lot.....
Back to top
Google
AdSense
Google Adsense




Post15 Nov 2007 19:22   

Ads




Back to top
btbass



Joined: 20 Jul 2001
Posts: 1187
Helped: 113
Location: Oberon


Post15 Nov 2007 19:49   

Re: how to convert float to string using HEW(renesas)


You can use sprintf. Takes up a bit of memory, but youcan do someyhing like

float value = 1.314;
char buffer[BUFFERSIZE];

sprintf(buffer, "Float = %f", value);
Back to top
svicent



Joined: 11 Jul 2001
Posts: 413
Helped: 23


Post16 Nov 2007 0:19   

Re: how to convert float to string using HEW(renesas)


Circuit Cellar magazine #187 (February 2006) contains the article "Output Real Numbers" which I think answers your question. The article contains the source code for a very efficient ftoa function.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> how to convert float to string using HEW(renesas)
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
using matlab how to convert string to vector ? (1)
Renesas HEW v.2.x Need ! (1)
converting from float to string (6)
How to convert a number string to several integer? (1)
[Matlab] How to convert vector to string and save it to file (1)
Convert float to char in 89C51 (3)
SKILL - Convert floating number to string (4)
how to convert dc to ac using C,C++ software (3)
float net and float pin in netlist (2)
How to convert AC 230V to DC 12V without using transformer ! (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS