bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assigning to multiple variables on same line


From: Marc Herbert
Subject: Re: Assigning to multiple variables on same line
Date: Tue, 11 Aug 2009 09:20:50 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

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

You might be interested in another difference:

g () 
{ 
    local x
            x=$(exit 3); echo $?
    local   y=$(exit 3); echo $?
}

$ g
3
0

I now tend to prefer splitting the "local" declaration from the variable 
definition...






reply via email to

[Prev in Thread] Current Thread [Next in Thread]