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

  • Next message: Wes Peters: "Re: gethostbyname_r"
    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"
    

  • Next message: Wes Peters: "Re: gethostbyname_r"