[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 24 Jul 2008 23:07:40 GMT
Pan/0.132 (Waxed in Black)
Having a shell function's variable changes reflected in its caller really
kinda makes me shudder - in fact, it reminds me of gosub. It seems like
a bug waiting to happen; I'm amazed I haven't been bitten by it yet.
It occurred to me that this might help - but of course it's probably
quite a bit slower:
Is there a better way today?
Wouldn't it be a valuable feature to add to a shell interpreter on shopt
or something, to have all shell functions create local variables rather
than global by default?
Followups directed to comp.unix.shell.
- Variable scoping,
Dan Stromberg <=