[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global variables
From: |
c. |
Subject: |
Re: global variables |
Date: |
Wed, 22 Jan 2014 19:30:03 +0100 |
On 22 Jan 2014, at 18:48, st.michal88 <address@hidden> wrote:
> After that variable A does not exist.
If you want the global variable to exist in a given scope
you have to declare it as global IN THAT SCOPE.
So, in your example, if you run only
>> test1
the variable A will be undefined in top scope.
While, if you do:
>> global A
>> test1
it will exist.
HTH,
c.
- Re: global variables, (continued)
- Re: global variables, louis scott, 2014/01/21
- Re: global variables, Doug Stewart, 2014/01/21
- Re: global variables, Michal Studniarek, 2014/01/21
- Re: global variables, Jose, 2014/01/21
- Re: global variables, Mike Miller, 2014/01/21
- Re: global variables, Michal Studniarek, 2014/01/21
- Re: global variables, st.michal88, 2014/01/22
- Re: global variables, st.michal88, 2014/01/22
- Re: global variables, Doug Stewart, 2014/01/22
- Re: global variables, st.michal88, 2014/01/22
- Re: global variables,
c. <=