From owner-freebsd-questions Sat Apr 28 17:22:35 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.cybersurf.net (smtp2.cybersurf.net [209.197.145.112]) by hub.freebsd.org (Postfix) with ESMTP id 826BF37B422 for ; Sat, 28 Apr 2001 17:22:32 -0700 (PDT) (envelope-from 01031149@3web.net) Received: from 3web.net ([209.197.157.201]) by smtp2.cybersurf.net (Netscape Messaging Server 4.15) with SMTP id GCJ2DH00.APU for ; Sat, 28 Apr 2001 18:22:29 -0600 Received: by 3web.net (EzMTS MTSAgent 1.22b Service) ; Sat, 28 Apr 01 18:21:41 -0600 for Received: from 3web.net (10.0.0.2) by 3web.net (EzMTS MTSSmtp 1.50 Service) ; Sat, 28 Apr 01 17:26:01 -0600 for Received: by mandy.rockingd.calgary.ab.ca (sSMTP sendmail emulation); Sat, 28 Apr 2001 17:25:34 -0600 Date: Sat, 28 Apr 2001 17:25:33 -0600 From: Duke Normandin <01031149@3web.net> To: Jan Grant Cc: Freebsd Questions Subject: Re: OT - C Pointers Message-ID: <20010428172532.A87243@mandy.rockingd.calgary.ab.ca> Mail-Followup-To: Jan Grant , Freebsd Questions References: <20010427193048.A70243@mandy.rockingd.calgary.ab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from "Jan Grant" on Sat, Apr 28, 2001 at 05:32:49PM X-Envelope-Receiver: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Apr 28, 2001 at 05:32:49PM +0100, Jan Grant wrote: > On Fri, 27 Apr 2001, Duke Normandin wrote: > > > > > Hi guys... > > > > Little OT if I might -- please! > > > > Ted Jensen, in his "A Tutorial on Pointers and Arrays in C" states, > > [cut] > > > Ruurd Pels, in his "A Brief Tutorial on Pointers, Lvalues, & Rvalues" > > states: > > > > [some text snipped for brevity] > > > > " Definitions: > > > > rvalue the attribute of a variable that holds the address where > > that particular variable is stored. > > lvalue the attribute of a variable that holds the value of the > > variable. > > > I'm confused!! In his "Definitions:" above, did Pels get rvalue and lvalue > > switched around? > > Yes. The "l" in "lvalue" comes from the fact that you need an lvalue on > the left-hand-side of the assignment operator. > > jan So given the fact, a variable is a tuple, namely: tuple(storage, scope, type, address, value) the "address" in the tuple is the lvalue -- or what's on the left of an assignment. the "value" in the tuple is the r value -- or what's on the right of an assignment. is that correct? So indeed, it appears that Pels mis-wrote. Thanks! -- -duke Calgary, Alberta, Canada To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message