X = ' a b'; /* Two blanks in each space */
Y = ' '; /* One blank */
N = 1;
I = verify(X,Y,N); /* I = 3 */
do while (I > 0);
display ( 'Nonblank at position ' || trim(I) );
N = I + 1;
I = verify(X,Y,N);
end;
After the first pass through the do-loop, N=4 and VERIFY(X,Y,N) returns 6. After the second pass, N=7 (LENGTH(x)+1), VERIFY(X,Y,N) now returns 0, and the loop ends.
For more examples of the VERIFY built-in function, see SEARCH.