Closed pranay001 closed 5 years ago
This is a good use case. Now the variable has to be read every time during the while loop run. I would suggest calling the 'Run Init Core' in 'Run Pre Core' instead of redoing the logic.
a should be accessible inside the one indent since the lifetime of a is for indents >= 0
Thanks, Navin. It looks like with the updates done by you it is working as expected. I have also committed the code.
While loop indentation issue is resolved now
Scenario: consider the while loop code as shown below.
a=0 while(a<10) ->a=a+1 ->print(a)
Reason: the a<10 in while loop will be validated only during Run init core., but it has to executed each time during the loop executes.
So did a similar implementation as Run init core inside Run pre core, and It works well. except for the scenario shown above. because a=a+1 cannot access "a" value which is inside while loop.(due to one intend back)