Subject: Re: [BUG] emulate sh: arith assignment assigns variable type
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Sat, 2 Jan 2016 12:46:59 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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.