Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jul 2003 13:19:20 -0700
From:      "Justin C. Walker" <justin@mac.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Can a pass-by-reference var be assigned to a local var?
Message-ID:  <768FECB4-ACCA-11D7-A6BB-00306544D642@mac.com>
In-Reply-To: <1843.216.120.158.65.1057173888.squirrel@www.mundomateo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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
*--------------------------------------*-------------------------------*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?768FECB4-ACCA-11D7-A6BB-00306544D642>