From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 2 13:19:24 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B0E437B401 for ; Wed, 2 Jul 2003 13:19:24 -0700 (PDT) Received: from smtpout.mac.com (A17-250-248-97.apple.com [17.250.248.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD94E43FE0 for ; Wed, 2 Jul 2003 13:19:23 -0700 (PDT) (envelope-from justin@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h62KJNad016453 for ; Wed, 2 Jul 2003 13:19:23 -0700 (PDT) Received: from mac.com (12-210-49-211.client.attbi.com [12.210.49.211]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 2.0) with ESMTP id h62KJL0T003025 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 2 Jul 2003 13:19:22 -0700 (PDT) Date: Wed, 2 Jul 2003 13:19:20 -0700 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: "Justin C. Walker" To: freebsd-hackers@freebsd.org Content-Transfer-Encoding: 7bit In-Reply-To: <1843.216.120.158.65.1057173888.squirrel@www.mundomateo.com> Message-Id: <768FECB4-ACCA-11D7-A6BB-00306544D642@mac.com> X-Mailer: Apple Mail (2.552) Subject: Re: Can a pass-by-reference var be assigned to a local var? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2003 20:19:24 -0000 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 *--------------------------------------*-------------------------------*