Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version:content-type;
        bh=ArfgM/qGisSCQpuYgtjHMzRzHgbuqGIKbGGyCZoxn9g=;
        b=cSU25UJoGoUMuXPOE0hnt16UFHQvgmxRKRVxmHjZcUr3QdkjS3WSJQ3fkpj7ih0l8M
         Bobgy+WTAVNpRYUXq75E+Jbt85DGpKdaOazlRf+pJISFcDJT0Qpm5pSlogZ1M1iFPOLI
         Fm5LpjrurUg7TpNaeKpN+Qu7jNQ0GkCFsdO21QahH9NsX/8STvucMpSzVmUAOw/lpugB
         rXw3z4L+eqP4D8VxSw9Kivaoc8fXPSN/+bDYgKdD4onue1jZ/p28/w0Nxo/bPIhIbrLb
         QHGahjLoRRNSeQEDRoikNpT0gtCCSOTLbe1yY/lYnh+YcL36VAqTLfofncoDFLb5ZOos
         rBfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=ArfgM/qGisSCQpuYgtjHMzRzHgbuqGIKbGGyCZoxn9g=;
        b=lk0vWXhwgV33hG0qqXBh0olSJ19PdGoQkFRXmKImeuAOVmyP5zb0Jr3N0KRFeRV/71
         m4dtWKTwo6XUvK23kshR7l5Pwjt2jE7GloLrKXEpJGFwTFq/28Q+ONUXAISqHb7gG6do
         yNunOrI4zCbZDWUYFTAasSW+OIQI5VqXJCzwjAVlihKmjBHT/Gxy6SYi3J7YAfJK7dLs
         5tqfaxVaM0YsFBmEndcK63lc71k5UOjOZ9YorUfM4zXkAe46MtUDzhvB0Bf7KUSr0oRk
         E2aE50bYTYJkVDxK7rYG5y1FESYeTa5TqNtLamYhczeZptoOPSbYYDbSKs7meTAVixWv
         R9FQ==
X-Gm-Message-State: ALoCoQknUjpAnERvOARNxj48pUohSo6sPpY1KR1yBIN41oHrT2SksTKN1LdaOOaE7O28LGGrLv/H5RvYB3POfpdcUAfmIkzx7Q==
X-Received: by 10.98.44.209 with SMTP id s200mr107910638pfs.2.1451767614955;
        Sat, 02 Jan 2016 12:46:54 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160102124659.ZM16393@torch.brasslantern.com>
Date: Sat, 2 Jan 2016 12:46:59 -0800
In-Reply-To: <20160102181126.364cc450@ntlworld.com>
Comments: In reply to Peter Stephenson <p.w.stephenson@ntlworld.com>
        "Re: [BUG] emulate sh: arith assignment assigns variable type" (Jan  2,  6:11pm)
References: <5686DB95.2090602@inlv.org>  <20160102181126.364cc450@ntlworld.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: [BUG] emulate sh: arith assignment assigns variable type
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37494

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.

