Can global variable be passed into Python function?
davea at davea.name
Sat Feb 22 16:02:10 CET 2014
Mark Lawrence <breamoreboy at yahoo.co.uk> Wrote in message:
> 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?
Don't know why you'd assume it's a register. It could just as
well be nowhere. If a later reference in the same function adds
it to something else, there might not need to be any hardware
anywhere representing the value 1.
Once you turn on a C optimizer, the real existence of local values
is not assured.
More information about the Python-list