Package: posh
Version: 0.5.7
Severity: normal

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.

Cheers,

-- System Information
Debian Release: 3.1
Kernel Version: Linux gondolin 2.6.17-rc4 #1 SMP PREEMPT Wed May 17 17:28:00 
EST 2006 i686 GNU/Linux

Versions of the packages posh depends on:
ii  debconf        1.4.30.13      Debian configuration management system
ii  libc6          2.3.2.ds1-22sa GNU C Library: Shared libraries and Timezone



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

Reply via email to