| Author |
Message |
ernytony
Joined: 30 Jun 2005 Posts: 13
|
19 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
|
19 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
|
19 Jul 2005 18:51 Re: convert double to char array |
|
|
|
|
| sorry I use Pic 16f877 & picclite
|
|
| Back to top |
|
 |
Google AdSense

|
19 Jul 2005 18:51 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
C-Man
Joined: 19 Jul 2001 Posts: 1235 Helped: 73
|
20 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 |
|
 |