Re: syntax errror



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
.



Relevant Pages

  • Re: int main(void) { return main(); }
    ... Memory fault ... int main ... Decode email address using b64decode or uudecode -m ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.lang.c)
  • Re: programming test? how to compute minimum for this:
    ... find a partition on the elements in this array into A1 and A2. ... int min ... Decode email address using b64decode or uudecode -m ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.programming)
  • Re: Checking if a file exists
    ... int main(int argc, char *argv) ... Decode email address using b64decode or uudecode -m ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.lang.c)
  • Re: Pointers in C
    ... since you are subtracting int pointers. ... You snipped my gcc command line, but I use -ansi and -std=c89 for my ... Decode email address using b64decode or uudecode -m ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.lang.c)
  • Re: format for declaring variables?
    ... always do int main. ... char *argv; ... int main(int argc, char **argv) ... strip view finger mount fcsk more fcsk yes spray umount sleep ...
    (comp.lang.c)