electronics forum

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

convert double to char array


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> convert double to char array
Author Message
ernytony



Joined: 30 Jun 2005
Posts: 13


Post19 Jul 2005 18:14   

convert double to char array


is possible convert double to char array
Back to top
C-Man



Joined: 19 Jul 2001
Posts: 1235
Helped: 73


Post19 Jul 2005 18:29   

Re: convert double to char array


You did not mention which compiler and processor you are using.

On an 8 bit processor something like this should work:
Code:

union
{
double doub;
char chars[4];
}help;



Now help.doub would adress your double value and help.chars[0] to help.chars[3] would adress the same as single chars.

Hope this does what you want to do.

best regards
Back to top
ernytony



Joined: 30 Jun 2005
Posts: 13


Post19 Jul 2005 18:51   

Re: convert double to char array


sorry I use Pic 16f877 & picclite
Back to top
Google
AdSense
Google Adsense




Post19 Jul 2005 18:51   

Ads




Back to top
C-Man



Joined: 19 Jul 2001
Posts: 1235
Helped: 73


Post20 Jul 2005 6:10   

Re: convert double to char array


ernytony wrote:
sorry I use Pic 16f877 & picclite


Then my above post should be ok for you ...

best regards
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 -> convert double to char array
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Char Array to double (5)
Convert float to char in 89C51 (3)
how to add int in some char array (1)
Convert Variable to Array in C (17)
convert image(size 64x64) to cell array np X 2....how?? (2)
float to char (8)
char=int (9)
custom char LCD (1)
Graphics on Char LCD? (4)
Mux with comma char (3)


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