You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I clicked the following simple program
<xml>
<block type="variables_set" inline="false" x="134" y="56">
<title i="1">item</title>
<value i="0">
<block type="math_number">
<title i="0">0</title>
</block>
</value>
<next>
<block type="procedures_callnoreturn">
<mutation name="procedure"></mutation>
<next>
<block type="text_print" inline="false">
<value i="0">
<block type="variables_get">
<title i="1">item</title>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
<block type="procedures_defnoreturn" x="348" y="69">
<title i="0">procedure</title>
<statement i="0">
<block type="variables_set" inline="false">
<title i="1">item</title>
<value i="0">
<block type="math_number">
<title i="0">1</title>
</block>
</value>
</block>
</statement>
</block>
</xml>
When running the JavaScript code the output is 1
When running the Python code the output is 0
Before running the Python code you have to move the function definition to the
top of the program or you will get an error.
Either at global item in the python or var item in JavaScript inside the
function definition would correct the Problem.
Or better let the user choose to have global or local variable.
Original issue reported on code.google.com by Gwa...@gmail.com on 5 Jun 2012 at 8:29
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
Gwa...@gmail.com
on 5 Jun 2012 at 8:29The text was updated successfully, but these errors were encountered: