Hi!

----

Is it normal that setting $ set -o nounset # in a function will keep
this function enabled even when I enter another function ?
For example:
-- snip --
$ /usr/bin/ksh93 -x -c 'function x { set -o nounset ; y; } ; function y
{ print "$foo" ; }>
+ x
/usr/bin/ksh93[1]: x[1]: y: line 1: foo/usr/bin/ksh93[1]: x[1]: y: line
1: : parameter not set
+ set -o nounset
/usr/bin/ksh93: line 1: foo/usr/bin/ksh93: line 1: foo/usr/bin/ksh93:
line 1: foo/home/test001/ksh93/ast_ksh_20080202/build_i3: parameter not
set
-- snip --
... function "x" sets "set -o nounset" and function "y" (called by
function "x") hits an error thanks to this flag. When exactly are these
flags set/unset/restored (I assume the previous status is returned when
leaving a function but the defaults are inherited from the parent
function, right ?) ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to