I am looking at the test below since 30 minutes and do not spot the error:
===== cut =====
function exec_op
{
nameref var=$1
typeset op=$2
typeset subvarname=$3
typeset value=$4
case "${op}" in
print)
print -v var
;;
add)
nameref node=var.${subvarname}
node="${value}"
;;
esac
return 0
}
function x1
{
exec_op container "$1" "$2" "$3"
return 0
}
set -o nounset
set -o noglob
compound container
x1 add foo bar dummy
x1 add world hello dummy
x1 print
===== cut =====
Why does this test fail with
xxx[36]: x1[26]: exec_op[16]: typeset: var.foo: no parent
xxx[37]: x1[26]: exec_op[16]: typeset: var.world: no parent
I don't get it.
Help, please.
Olga
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ [email protected] \-`\-'----.
`'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
/\/\ /\/\
`--` `--`
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users