canonical values - an amenity

Wayne Throop throopw at dg_rtp.UUCP
Tue Dec 9 02:14:05 AEST 1986


> karl at haddock.UUCP (Karl Heuer)
> Let me make a [proposal]
> the C community):
>    typedef union { int asint; char *asstring; double asreal; } universe;
>    universe u;  int i;
>    ...
>    u = (universe)i;

Oooooooh!  I LIKE it.  But I'd druther have the general ability to coin
struct and union constants... passing small structs full of bitfields to
functions that are manufactured out of integers on the fly is a more
common problem.

--
A LISP programmer knows the value of everything, but the cost of nothing.
                                --- Alan J. Perlis
-- 
Wayne Throop      <the-known-world>!mcnc!rti-sel!dg_rtp!throopw



More information about the Comp.lang.c mailing list