Re: syntax errror
- From: Daniel Rudy <spamthis@xxxxxxxxxxxx>
- Date: Fri, 09 Dec 2005 18:44:34 GMT
At about the time of 12/4/2005 10:38 AM, Chris Torek stated the following:
> (You can also define new types with "union" and "enum", but the
> latter two are limited; "struct" is not. Being unlimited is often
> a mixed blessing -- "goto" is unlimited while structured looping
> constructs like "for" and "while" are limited -- but in this case,
> doing a cost/benefit analysis for struct vs union-or-enum usually
> results in choosing "struct", at least for me.)
Actually, unions have their place. The ability to take a int and break
it into bytes in quite useful at times.
union __break_int_tag
{
unsigned int integer;
unsigned char bytes[sizeof(integer)];
}
But then portability issues arise when you do this because of the
endiness of the machine.
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep
.
- Follow-Ups:
- Re: syntax errror
- From: Kenny McCormack
- Re: syntax errror
- From: Jordan Abel
- Re: syntax errror
- References:
- syntax errror
- From: danu
- Re: syntax errror
- From: Daniel Rudy
- Re: syntax errror
- From: Keith Thompson
- Re: syntax errror
- From: Daniel Rudy
- Re: syntax errror
- From: Chris Torek
- syntax errror
- Prev by Date: Re: Speed of finding a size of an array.
- Next by Date: Re: Speed of finding a size of an array.
- Previous by thread: Re: syntax errror
- Next by thread: Re: syntax errror
- Index(es):
Relevant Pages
|