zsh-workers
 help / color / mirror / code / Atom feed
From: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
To: jos@catnook.com, "'Clint Adams'" <clint@zsh.org>
Cc: zsh-workers@sunsite.dk
Subject: RE: posix compliance
Date: Fri, 21 Jun 2002 09:19:15 +0400	[thread overview]
Message-ID: <6134254DE87BD411908B00A0C99B044F03A0B2D3@mowd019a.mow.siemens.ru> (raw)
In-Reply-To: <20020620180526.GA65950@lizzy.catnook.com>

> A quick report from UseNIX: One thing Jordan Hubbard of Apple
mentioned was
> that our positional parameters ($1, $2, etc.) are assignable whereas
they
> are
> not in bash (Chet Ramey, who was also present, confirmed this). The
bash
> behavior is apparently what POSIX specifies.

It depends.

SUS V3 (which I hope is quite reliable representation of POSIX) says
that interpretation of

WORD1=WORD2

where WORD1 is not a name is implementation defined. It may be legally
interpreted as assignment.


You are correct that in case of ${WORD1=WORD2} it is prohibited:

${parameter:=word} 
Assign Default Values. If parameter is unset or null, the expansion of
word shall be assigned to parameter. In all cases, the final value of
parameter shall be substituted. Only variables, not positional
parameters or special parameters, can be assigned in this way.

In case of read built-in it is unclear. There are no explicit
restrictions; one may infer that special parameters are invalid only
from this line:

var 
The name of an existing or nonexisting shell variable.

and only due to usage of "name" here.


-andrej


  parent reply	other threads:[~2002-06-21  5:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 22:58 Clint Adams
2002-06-20 18:05 ` Jos Backus
2002-06-20 18:13   ` Bart Schaefer
2002-06-20 19:17     ` Jos Backus
2002-06-20 21:31       ` Dan Nelson
2002-06-21  5:19   ` Borsenkow Andrej [this message]
2002-06-21 11:35   ` Oliver Kiddle
2002-06-23 17:53     ` Bart Schaefer
2002-06-20 21:19 Chet Ramey
2002-06-21  4:30 ` Jos Backus

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=6134254DE87BD411908B00A0C99B044F03A0B2D3@mowd019a.mow.siemens.ru \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=clint@zsh.org \
    --cc=jos@catnook.com \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).