Nested function scope problem

Antoon Pardon apardon at forel.vub.ac.be
Wed Aug 2 13:28:20 EDT 2006


On 2006-08-02, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On 2 Aug 2006 13:09:26 GMT, Antoon Pardon <apardon at forel.vub.ac.be>
> declaimed the following in comp.lang.python:
>
>> 
>> And how is this all relevant in deciding that the source language for
>> the above interpreter actions isn't C? What the interpreter does is
>> the following:
>> 
>>   Get the addres of the variable c
>>   Get the value that is at that address.
>>   Add 100 to this value
>>   Store the new value at that address.
>> 
>> Please explain what is wrong in this sequence of actions
>> for an interpretation of the C statement: "c = c + 100;"
>
> 	What interpretation will your hypothetical give for:
>
> 	c = &c + 1
> 	c++
>
> and
>
> 	d = *(1000)		#I'll concede this one may be a bit invalid
> 					#I don't recall if a cast is needed

Why should I answer this? You stated that my interpreter couldn't
be interpreting the C-language. You did that before you asked these
questions. So it seems your decision for your statement is not
dependend om my answer for these questions. So please clarify
how you came to your decision.

-- 
Antoon Pardon



More information about the Python-list mailing list