On Sun, Oct 07, 2007 at 11:21:31PM +0800, [EMAIL PROTECTED] wrote:
> I'm in the process of implementing assignment/conditional operator
> support in dash.  I noticed that posh/pdksh has an anomaly with the
> conditional operator in that both arguments seem to be evaluated.
> POSIX defers to ISO C on this which forbids the evaluation of both
> operators.
> 
> For example,
> 
> $ posh -c 'echo $((0 ? x = 3 : 4)); echo $x'
> 4
> 3
> $ bash -c 'echo $((0 ? x = 3 : 4)); echo $x'
> 4
> 
> $
> 
> Putting brackets around x = 3 seems to fix it so this could be
> a parse error.

Parentheses, I assume.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to