Usage of UDO in while loop

p.s. it relates to this post Bitten by i - #3 by tjingboem