From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] rc From: David Gordon Hogan MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-rqwhgrozimfytwwuwdcoqqcybc" Message-Id: <20020113211736.22C0F19A05@mail.cse.psu.edu> Date: Sun, 13 Jan 2002 16:17:34 -0500 Topicbox-Message-UUID: 3daadec0-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-rqwhgrozimfytwwuwdcoqqcybc Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit The following experiment, hopefully, provides further insight into how the expression is parsed by rc, and how adding a caret fixes the problem: dhog% a=(alice bob) dhog% fn f { echo $a(1)/ } dhog% fn g { echo $a(1)^/ } dhog% f alice / dhog% g alice/ dhog% whatis f fn f {echo $a(1) /} dhog% whatis g fn g {echo $a(1)^/} Observe how rc does not insert a free caret into "$a(1)/". Instead, the slash starts a new word. I'm a little suprised by that; I think I'd prefer a syntax error. --upas-rqwhgrozimfytwwuwdcoqqcybc Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Sat Jan 12 22:39:37 EST 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Sat Jan 12 22:39:31 EST 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6287919A11; Sat, 12 Jan 2002 22:39:17 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from math.psu.edu (leibniz.math.psu.edu [146.186.130.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1601A19A08 for <9fans@cse.psu.edu>; Sat, 12 Jan 2002 22:37:24 -0500 (EST) Received: from weyl.math.psu.edu (weyl.math.psu.edu [146.186.130.226]) by math.psu.edu (8.9.3/8.9.3) with ESMTP id WAA00713; Sat, 12 Jan 2002 22:37:23 -0500 (EST) Received: from localhost (viro@localhost) by weyl.math.psu.edu (8.9.3/8.9.3) with ESMTP id WAA25088; Sat, 12 Jan 2002 22:37:22 -0500 (EST) X-Authentication-Warning: weyl.math.psu.edu: viro owned process doing -bs From: Alexander Viro To: 9fans@cse.psu.edu Cc: 9fans@nx.aichi-u.ac.jp Subject: Re: [9fans] rc In-Reply-To: <20020113033418.3EC0119981@mail.cse.psu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.8 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Help: List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 12 Jan 2002 22:37:22 -0500 (EST) On Sun, 13 Jan 2002 arisawa@ar.aichi-u.ac.jp wrote: > Hello, > > The following result is curious for me. > > term% a=(alice bob) > term% echo $a(1)/ > alice / > term% b=$a(1) > term% echo $b/ > alice/ > > Is this a specification or bug? The former. See the rules for implicit ^ insertion. --upas-rqwhgrozimfytwwuwdcoqqcybc--