osdir.com


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

Can global variable be passed into Python function?


Mark Lawrence <breamoreboy at yahoo.co.uk>:

> On 22/02/2014 02:47, Dennis Lee Bieber wrote:
>> 	BASIC, C, FORTRAN, COBOL, Assembly... A "variable" is synonym
>> for an address [a box that holds things].
>
> In C.
>
> int xyz = 1;
>
> xyz is placed in a register. What is xyz called now as it's not in
> memory?

It's still a box, just like in Python.

The difference is that while in C, the box looks like this:

   <URL: http://www.daikudojo.org/Archive/daikusan/bob.le/20090314_dovetail_box/pics/DSC_0767.JPG>

in Python, it looks like this:

   <URL: http://www.dejavubuffet.fi/wp-content/uploads/2012/10/korurasia31.jpg>


Marko