Yang Zhang wrote:
> Why does assigning to multiple variables on the same line exhibit
> sequential consistency normally but not for local variables?

Because `local' is a command, and word expansion is performed on its
arguments before it's invoked.  This means the expansion is performed
before `local' performs the assignment (local sees two arguments:
`a=x' and `b=').  Variable assignments by themselves behave differently --
expansion and assignment are done at the same time.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to