Re: Floats to chars and chars to floats
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Tue, 20 Sep 2005 21:49:39 +0000 (UTC)
In article <11j10el4efq6ffd@xxxxxxxxxxxxxxxxxx>,
Baxter <lbax02.spamguard@xxxxxxxxxxx> top-posted:
>> The original poster's requirements are that the data be transmitted
>> 8-bits at a time. Your code does not portably do that.
>That's why I mentioned "byte" - where "byte" is defined, either by the
>system or by the programmer to be 8-bit.
There is nothing in C89 that allows one to define an 8-bit entity
at all portably.
In C99, there is a uint8_t but C99 defines it in such a way that
support for it is optional in an implementation. Your sample code
did not test for the appropriate macro that would indicate the
existance of uint8_t .
Thus, your code is not portable.
--
Chocolate is "more than a food but less than a drug" -- RJ Huxtable
.
- References:
- Floats to chars and chars to floats
- From: Kosio
- Re: Floats to chars and chars to floats
- From: Walter Roberson
- Re: Floats to chars and chars to floats
- From: Walter Roberson
- Re: Floats to chars and chars to floats
- From: Baxter
- Floats to chars and chars to floats
- Prev by Date: Re: Floats to chars and chars to floats
- Next by Date: strtok() problem
- Previous by thread: Re: Floats to chars and chars to floats
- Next by thread: Re: Floats to chars and chars to floats
- Index(es):
Relevant Pages
|