Re: Can a pass-by-reference var be assigned to a local var?
From: Justin C. Walker (justin_at_mac.com)
Date: 07/02/03
- Previous message: Daniel Lang: "Re: USB serial support on FreeBSD 3.5?"
- In reply to: Matthew Hagerty: "Re: Can a pass-by-reference var be assigned to a local var?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 2 Jul 2003 13:19:20 -0700 To: freebsd-hackers@freebsd.org
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
*--------------------------------------*-------------------------------*
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Daniel Lang: "Re: USB serial support on FreeBSD 3.5?"
- In reply to: Matthew Hagerty: "Re: Can a pass-by-reference var be assigned to a local var?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]