Chet Ramey <[email protected]> wrote:

> This is from the ksh93 release documentation:
>
> 1.      Functions, defined with name() with ksh-93 are compatible with
>         the POSIX standard, not with ksh-88.  No local variables are
>         permitted, and there is no separate scope.  Functions defined
>         with the function name syntax, have local variables as in ksh-88
>         but are statically scoped as in C so that a function does not
>         automatically have access to local variables of the caller.
>         This change also affects function traces.
>
> I have to check my ksh88 book, but I believe that ksh88 functions had
> local scope for traps and options as well as variables.

ksh88 has POSIX compliant functions, see:

ksh -c 'a=0; a() { a=12; } ; a; echo $a'
12

Jörg

-- 
 EMail:[email protected]                    (home) Jörg Schilling D-13353 Berlin
    [email protected] (work) Blog: http://schily.blogspot.com/
 URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'

Reply via email to