Le Tue, 9 Apr 2013 13:45:25 -0400
John Chludzinski a écrit:
> As is probably no surprise to anyone, the script below results in: P = 0
>
> #!/usr/bin/ksh
>
> P=0
> function test
> {
> $1=12
> }
> test P
> echo "P = $P"
>
> exit 0
>
> Is there a way to pass-by-reference? Where P = 12 ?Maybe "eval $1=12" is what you are looking for in test(). :) ++ Seb.
