[ksh93-integration-discuss] Array of functions: cannot be an array?

Robert Neville rbtneville at gmail.com
Fri Dec 14 08:44:46 PST 2007


The example below tries to create an array of functions but only
returns an error:
% ksh93
$ ksh93 -c 'function foo[1] { echo "hello" ; }'
ksh93: line 1: foo[1]: cannot be an array
$ ksh93 -c 'function -a foo[1] { echo "hello" ; }'
ksh93: line 1: -a: invalid function name

Is this a bug or are functions treated differently than shell variables?
-- 
robert neville - it consultant


More information about the ksh93-integration-discuss mailing list