The second j := j + 1 from the example seems to be missing? --Paddy3118 17:04, 27 April 2009 (UTC)
j := j + 1