cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

While loop - infinite calculation - reason?

SOLVED
Highlighted
Newbie

While loop - infinite calculation - reason?

Hello,

My name is Daniel and I would like to kindly ask you for help with while loop. The problem is that i cant calculate this loop because it looks like it never ends. Any ideas why? Can somebody look at it for me please? Here's my code:

Loop.png

And here is how it should work step by step

Loop_EXPLANATION.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: While loop - infinite calculation - reason?

Its hard to debug a picture!

Please post the worksheet.

You can do so by clicking "Use advanced editor" at the upper right. Then you get at the lower right an option to attach files.

WE

EDIT:

Maybe its simpler than I thought.

You use variables "sigma.com.ed.1" AND "sigma.com.ed1" in your program. Guess both should be the same variable and the dot before the 1 is a typo.

Anyway, "sigma.com.ed" and "sigma.com.ed.1" are use as condition in the while loop but both never change - that explains the endless loop.

2 REPLIES 2

Re: While loop - infinite calculation - reason?

Its hard to debug a picture!

Please post the worksheet.

You can do so by clicking "Use advanced editor" at the upper right. Then you get at the lower right an option to attach files.

WE

EDIT:

Maybe its simpler than I thought.

You use variables "sigma.com.ed.1" AND "sigma.com.ed1" in your program. Guess both should be the same variable and the dot before the 1 is a typo.

Anyway, "sigma.com.ed" and "sigma.com.ed.1" are use as condition in the while loop but both never change - that explains the endless loop.

Re: While loop - infinite calculation - reason?

Oooh my GOD , you are right! thank you very much. saved my day. this is just stupid... Im just laughing right now its every time thing like that. btw I forgot to upload the file but it doesn't matter anymore.

Heres the working code (there was also mistake in condition)

Loop_WORKING.png