Skip to main content
1-Visitor
March 16, 2016
Solved

While loop - infinite calculation - reason?

  • March 16, 2016
  • 1 reply
  • 1932 views

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

Best answer by Werner_E

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.

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
March 16, 2016

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.

dcompel1-VisitorAuthor
1-Visitor
March 16, 2016

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