convert double to char array

Status
Not open for further replies.

ernytony

Newbie level 6
Joined
Jun 30, 2005
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,376
is possible 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
 

sorry I use Pic 16f877 & picclite
 

ernytony said:
sorry I use Pic 16f877 & picclite

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

best regards
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…