9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Gordon Hogan <dhog@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rc
Date: Sun, 13 Jan 2002 16:17:34 -0500	[thread overview]
Message-ID: <20020113211736.22C0F19A05@mail.cse.psu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

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.


[-- Attachment #2: Type: message/rfc822, Size: 2011 bytes --]

From: Alexander Viro <viro@math.psu.edu>
To: 9fans@cse.psu.edu
Cc: 9fans@nx.aichi-u.ac.jp
Subject: Re: [9fans] rc
Date: Sat, 12 Jan 2002 22:37:22 -0500 (EST)
Message-ID: <Pine.GSO.4.21.0201122236100.24774-100000@weyl.math.psu.edu>



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.

             reply	other threads:[~2002-01-13 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-13 21:17 David Gordon Hogan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-13  2:32 arisawa
2002-01-13  3:37 ` Alexander Viro
2000-11-23  0:03 arisawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020113211736.22C0F19A05@mail.cse.psu.edu \
    --to=dhog@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).