Jan Svitok wrote: > > Also, in my while loop I needed to initialize the input variable before > > the loop, but in the 'loop do' you use here it does not need to be. > > Would you mind explaining why? > > in 'loop do' input is tested after assignment > in while loop it is tested before assignment, so to do the test > reasonably, you have to provide some initial value. > > notice the while (input = gets) != "\n" version - assignment and test > in one place (although I would say that this kind should be avoided if > possible, due to readability issues) Makes sense. Thanks for taking the time to explain!