On Mon, Jun 09, 2008 at 05:58:21PM +0100, Stephane Chazelas wrote:
> If I read SUSv3 correctly, the echo statement shouldn't have output "1".
On the other hand, ksh93 does it that way, and the pdksh source code contains:
/* ksh functions don't keep assignments, POSIX functions do.
On Mon, Jun 09, 2008 at 05:58:21PM +0100, Stephane Chazelas wrote:
> $ f() { echo $a; }
> $ a=1 f
> 1
> $ echo $a
> 1
>
>
> If I read SUSv3 correctly, the echo statement shouldn't have output "1".
I agree.
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject o
Package: posh
Version: 0.6.7
Severity: normal
$ f() { echo $a; }
$ a=1 f
1
$ echo $a
1
If I read SUSv3 correctly, the echo statement shouldn't have output "1".
Now it's true that in cases like:
$ ksh93 -c 'f() { a=2; }; a=1 f; echo $a'
2
$ bash -c 'f() { a=2; }; a=1 f; echo $a'
$ pdksh -c 'f
3 matches
Mail list logo