Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] emulate sh: arith assignment assigns variable type



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.



Messages sorted by: Reverse Date, Date, Thread, Author