Can a pass-by-reference var be assigned to a local var?

Justin C. Walker justin at mac.com
Wed Jul 2 13:19:24 PDT 2003


On Wednesday, July 2, 2003, at 12:24 PM, Matthew Hagerty wrote:

> Justin,
>
> Yes, after reading your post, I found this:
>
> --
> Structure Assignments
>
> ANSI C compilers allow the information in one structure to be assigned 
> to
> another structure, as in:
>
>      binfo=addr_info;
> --
>
> I never knew that.

Another day, another factoid.  :-}

> I wonder why that functionality is done for structs,
> but not extended to arrays as well?  Why make exceptions for structs 
> like
> that?

I'll guess that this isn't done because you never know exactly what the 
array bounds are (C doesn't provide run-time type checking).

Cheers,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        |   If you're not confused,
                                        |   You're not paying attention
*--------------------------------------*-------------------------------*



More information about the freebsd-hackers mailing list