"Cai Gengyang" wrote in message news:c2dfc9c4-3e16-480c-aebf-55308177510f at googlegroups.com... > Sure, so how would the code look like if I want the "if" statement to be > nested inside the "while" loop Have you tried putting the 'if' statement inside the 'while' loop? If not, give it a shot and see what happens. Frank Millman