zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [BUG] emulate sh: arith assignment assigns variable type
Date: Sat, 2 Jan 2016 12:46:59 -0800	[thread overview]
Message-ID: <160102124659.ZM16393@torch.brasslantern.com> (raw)
In-Reply-To: <20160102181126.364cc450@ntlworld.com>

On Jan 2,  6:11pm, Peter Stephenson wrote:
}
} Does this need a special option?  The linkage is a bit tenouous.

Are there other assignment-time differences?  Maybe a POSIX_ASSIGNMENT
option is in order, though I dislike moving functionality from one
option to another.

On the other hand, is this --

}  	pm = createparam(t, ss ? PM_ARRAY :
} +			 isset(POSIXIDENTIFIERS) ? PM_SCALAR :
}  			 (val.type & MN_INTEGER) ? PM_INTEGER : PM_FFLOAT);

-- really the correct fix?  I was thinking more along the lines of
creating it as an integer but then changing the type back to scalar
at the time of assignment if the assigned string did not parse as an
arithmetic expression.


  parent reply	other threads:[~2016-01-02 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01 20:03 Martijn Dekker
2016-01-02 18:11 ` Peter Stephenson
2016-01-02 19:37   ` Mikael Magnusson
2016-01-02 20:46   ` Bart Schaefer [this message]
2016-01-02 21:12     ` Peter Stephenson
2016-01-13  3:13   ` Martijn Dekker

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=160102124659.ZM16393@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).