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

Parameter scope error



a() {
 for 1 in 1 2 3; do
  typeset -F1.1 a
  a=$1
 done
}
a
echo $a
unset a
echo $a
unset a
echo $a

output:
(anon):typeset: bad precision value: 1.1
(anon):typeset: bad precision value: 1.1
(anon):typeset: bad precision value: 1.1
3.0000000000
2.0000000000
1.0000000000


-- 
Mikael Magnusson



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