From: Jan Svitok Date: 2006-07-26T23:27:11+09:00 Subject: Re: Learn to program (Chris Pine) array.sort > 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)